Keypad will generate keycodes when keypad application mode is enabled. It
can cause problems with some programs like vi, which operates in such
mode.
This patch change by default don't generate the keycodes never, but this
behaviour can be changed using the combination Alt + NumLock.
---
config.def.h | 34 ++++++++++++++++++----------------
st.c | 17 +++++++++++++++--
2 files changed, 33 insertions(+), 18 deletions(-)
This patch apply the same code for shortcuts that it is used now for defined
keys. So it is possible use now XK_NO_MOD and XK_ANY_MOD for defining shortcuts.
---
st.c | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
XK_NO_MOD match a key without modifiers and XK_ANY_MOD match a key does not
matter what modifiers are pressed to. Like they are mask the best value for
XK_ANY_MOD is all the bits to 1, so the and with any state will be equal to
the state. This also imply that is necessary check the case for XK_NO_MOD
(no modifiers at all) with some modifier in state, and the inverse
(some mask different to XK_ANY_MOD or XK_NO_MOD and no modifiers in state).
---
st.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
When Shift + Tab is pressed X server send the event XK_ISO_Left_Tab with
ShiftMask, so this is the entry we need in config.def.h
This patch also revert the previous patch for this issue because it breaks
the keyboard.
---
config.def.h | 2 +-
st.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Some keys were in the Key array while others were hardcoded in
kpress().This cause some problems with some keys which can generate more of
one string based in the configuration of the terminal.
---
config.def.h | 70 ++++++++++++++++++++++++++++++++++++++++-----------------
st.c | 71 +++++++++++++++++++++++++---------------------------------
2 files changed, 79 insertions(+), 62 deletions(-)
Shift + Insert is used like a hot key for paste the selection, so it is more
logical move it to shortcut array instead of having special code for it.
---
config.def.h | 1 +
st.c | 13 +++----------
2 files changed, 4 insertions(+), 10 deletions(-)
Keypad mode is used for detecting when keys in the auxiliary keypad are
pressed, while cursor mode is used for detecting when a cursor is pressed,
but they are different modes.
St was mixing both modes and DECPAM and DECPNM modified the cursor mode, and
this was incorrect.
---
st.c | 5 +++--
st.info | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)