diff options
| author | joe <rbo@gmx.us> | 2025-09-27 18:26:49 +0200 |
|---|---|---|
| committer | joe <rbo@gmx.us> | 2025-09-27 18:26:49 +0200 |
| commit | fe05bb9fa96d789f2836b64c1f35c75f1d52d129 (patch) | |
| tree | 4566a7ca96565740f45a2ad781eca1404f969109 /x.c | |
| parent | patches (diff) | |
| download | st-fe05bb9fa96d789f2836b64c1f35c75f1d52d129.tar.gz st-fe05bb9fa96d789f2836b64c1f35c75f1d52d129.tar.bz2 st-fe05bb9fa96d789f2836b64c1f35c75f1d52d129.tar.xz st-fe05bb9fa96d789f2836b64c1f35c75f1d52d129.tar.zst st-fe05bb9fa96d789f2836b64c1f35c75f1d52d129.zip | |
up
Diffstat (limited to 'x.c')
| -rw-r--r-- | x.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1876,6 +1876,13 @@ kpress(XEvent *ev) } else { len = XLookupString(e, buf, sizeof buf, &ksym, NULL); } + if ( IS_SET(MODE_KBDSELECT) ) { + if ( match(XK_NO_MOD, e->state) || + (XK_Shift_L | XK_Shift_R) & e->state ) + win.mode ^= trt_kbdselect(ksym, buf, len); + return; + } + /* 1. shortcuts */ for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { if (ksym == bp->keysym && match(bp->mod, e->state)) { @@ -2053,6 +2060,14 @@ usage(void) " [stty_args ...]\n", argv0, argv0); } +void toggle_winmode(int flag) { + win.mode ^= flag; +} + +void keyboard_select(const Arg *dummy) { + win.mode ^= trt_kbdselect(-1, NULL, 0); +} + int main(int argc, char *argv[]) { |
