mirror of
https://github.com/Cloudef/bemenu
synced 2024-11-23 17:32:11 +01:00
Add some Emacs keybindings
* C-v to curses backend * C-v, M-v, M-<, M-> to x11 and wayland backends Signed-off-by: Jari Vetoniemi <mailroxas@gmail.com>
This commit is contained in:
parent
30ed5b1916
commit
0874fc5d49
@ -277,6 +277,7 @@ poll_key(const struct bm_menu *menu, uint32_t *unicode)
|
||||
case KEY_PPAGE: /* Page up */
|
||||
return BM_KEY_PAGE_UP;
|
||||
|
||||
case 22: /* C-v */
|
||||
case KEY_NPAGE: /* Page down */
|
||||
return BM_KEY_PAGE_DOWN;
|
||||
|
||||
|
@ -85,9 +85,18 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode)
|
||||
case XKB_KEY_SunPageUp:
|
||||
return (mods & MOD_SHIFT ? BM_KEY_SHIFT_PAGE_UP : BM_KEY_PAGE_UP);
|
||||
|
||||
case XKB_KEY_less:
|
||||
return (mods & MOD_ALT ? BM_KEY_SHIFT_PAGE_UP : BM_KEY_UNICODE);
|
||||
|
||||
case XKB_KEY_SunPageDown:
|
||||
return (mods & MOD_SHIFT ? BM_KEY_SHIFT_PAGE_DOWN : BM_KEY_PAGE_DOWN);
|
||||
|
||||
case XKB_KEY_greater:
|
||||
return (mods & MOD_ALT ? BM_KEY_SHIFT_PAGE_DOWN : BM_KEY_UNICODE);
|
||||
|
||||
case XKB_KEY_v:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PAGE_DOWN : (mods & MOD_ALT ? BM_KEY_PAGE_UP : BM_KEY_UNICODE));
|
||||
|
||||
case XKB_KEY_BackSpace:
|
||||
return BM_KEY_BACKSPACE;
|
||||
|
||||
|
@ -71,9 +71,18 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode)
|
||||
case XK_Page_Up:
|
||||
return (mods & MOD_SHIFT ? BM_KEY_SHIFT_PAGE_UP : BM_KEY_PAGE_UP);
|
||||
|
||||
case XK_less:
|
||||
return (mods & MOD_ALT ? BM_KEY_SHIFT_PAGE_UP : BM_KEY_UNICODE);
|
||||
|
||||
case XK_Page_Down:
|
||||
return (mods & MOD_SHIFT ? BM_KEY_SHIFT_PAGE_DOWN : BM_KEY_PAGE_DOWN);
|
||||
|
||||
case XK_greater:
|
||||
return (mods & MOD_ALT ? BM_KEY_SHIFT_PAGE_DOWN : BM_KEY_UNICODE);
|
||||
|
||||
case XK_v:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PAGE_DOWN : (mods & MOD_ALT ? BM_KEY_PAGE_UP : BM_KEY_UNICODE));
|
||||
|
||||
case XK_BackSpace:
|
||||
return BM_KEY_BACKSPACE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user