This sequence lock/unlock the keyboard ignoring all the key pressing events
from X server.
---
st.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
MODE_MOUSEBTN = 32,
MODE_MOUSEMOTION = 64,
MODE_MOUSE = 32|64,
- MODE_REVERSE = 128
+ MODE_REVERSE = 128,
+ MODE_KBDLOCK = 256
};
enum escape_state {
}
} else {
switch(*args) {
+ case 2:
+ MODBIT(term.mode, set, MODE_KBDLOCK);
+ break;
case 4:
MODBIT(term.mode, set, MODE_INSERT);
break;
int shift;
Status status;
+ if (IS_SET(MODE_KBDLOCK))
+ return;
meta = e->state & Mod1Mask;
shift = e->state & ShiftMask;
len = XmbLookupString(xw.xic, e, buf, sizeof(buf), &ksym, &status);