Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdd KAM sequence - st - [fork] customized build of st, the simple terminal
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 2f215654a4b27eb573fb6551d28bdf760e95ef58
parent 11bec67875936ffd954c7c28faf98b3cc25cb47f
Author: Roberto E. Vargas Caballero <[email protected]>
Date: Mon, 24 Sep 2012 10:28:05 +0200
Add KAM sequence
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(-)
Diffstat:
M st.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/st.c b/st.c
t@@ -110,7 +110,8 @@ enum term_mode {
MODE_MOUSEBTN = 32,
MODE_MOUSEMOTION = 64,
MODE_MOUSE = 32|64,
- MODE_REVERSE = 128
+ MODE_REVERSE = 128,
+ MODE_KBDLOCK = 256
};
enum escape_state {
t@@ -1328,6 +1329,9 @@ tsetmode(bool priv, bool set, int *args, int narg) {
}
} else {
switch(*args) {
+ case 2:
+ MODBIT(term.mode, set, MODE_KBDLOCK);
+ break;
case 4:
MODBIT(term.mode, set, MODE_INSERT);
break;
t@@ -2257,6 +2261,8 @@ kpress(XEvent *ev) {
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);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.