From 7d019e767b8dc3e69d6f17ad4f4d69e3948257e1 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 18 Jan 2015 04:43:29 +0200 Subject: [PATCH] Bind alt+h and alt+l as well --- lib/renderers/wayland/wayland.c | 4 ++-- lib/renderers/x11/x11.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/renderers/wayland/wayland.c b/lib/renderers/wayland/wayland.c index e7339ff..c348c7a 100644 --- a/lib/renderers/wayland/wayland.c +++ b/lib/renderers/wayland/wayland.c @@ -113,7 +113,7 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode) return (mods & MOD_CTRL ? BM_KEY_DOWN : BM_KEY_UNICODE); case XKB_KEY_l: - return (mods & MOD_CTRL ? BM_KEY_LEFT : BM_KEY_UNICODE); + return (mods & MOD_CTRL ? BM_KEY_LEFT : (mods & MOD_ALT ? BM_KEY_DOWN : BM_KEY_UNICODE)); case XKB_KEY_f: return (mods & MOD_CTRL ? BM_KEY_RIGHT : BM_KEY_UNICODE); @@ -125,7 +125,7 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode) return (mods & MOD_CTRL ? BM_KEY_END : BM_KEY_UNICODE); case XKB_KEY_h: - return (mods & MOD_CTRL ? BM_KEY_BACKSPACE : BM_KEY_UNICODE); + return (mods & MOD_CTRL ? BM_KEY_BACKSPACE : (mods & MOD_ALT ? BM_KEY_UP : BM_KEY_UNICODE)); case XKB_KEY_u: return (mods & MOD_CTRL ? BM_KEY_LINE_DELETE_LEFT : (mods & MOD_ALT ? BM_KEY_PAGE_UP : BM_KEY_UNICODE)); diff --git a/lib/renderers/x11/x11.c b/lib/renderers/x11/x11.c index 88baee8..3e991c9 100644 --- a/lib/renderers/x11/x11.c +++ b/lib/renderers/x11/x11.c @@ -102,7 +102,7 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode) return (mods & MOD_CTRL ? BM_KEY_DOWN : BM_KEY_UNICODE); case XK_l: - return (mods & MOD_CTRL ? BM_KEY_LEFT : BM_KEY_UNICODE); + return (mods & MOD_CTRL ? BM_KEY_LEFT : (mods & MOD_ALT ? BM_KEY_DOWN : BM_KEY_UNICODE)); case XK_f: return (mods & MOD_CTRL ? BM_KEY_RIGHT : BM_KEY_UNICODE); @@ -114,7 +114,7 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode) return (mods & MOD_CTRL ? BM_KEY_END : BM_KEY_UNICODE); case XK_h: - return (mods & MOD_CTRL ? BM_KEY_BACKSPACE : BM_KEY_UNICODE); + return (mods & MOD_CTRL ? BM_KEY_BACKSPACE : (mods & MOD_ALT ? BM_KEY_UP : BM_KEY_UNICODE)); case XK_u: return (mods & MOD_CTRL ? BM_KEY_LINE_DELETE_LEFT : (mods & MOD_ALT ? BM_KEY_PAGE_UP : BM_KEY_UNICODE));