aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/options_keys.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2014-09-30 22:07:28 +0200
committerBoris Faure <billiob@gmail.com>2014-09-30 22:07:28 +0200
commit6f27cdc3ece421ebbfdae83e60df19bc4d356c3d (patch)
treecd9e5f34630a395c97767a500812d1f69f98d1e4 /src/bin/options_keys.c
parentfix ctrl-minus. Closes T1698 (diff)
downloadterminology-6f27cdc3ece421ebbfdae83e60df19bc4d356c3d.tar.gz
key bindings now support the win key
Diffstat (limited to 'src/bin/options_keys.c')
-rw-r--r--src/bin/options_keys.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/options_keys.c b/src/bin/options_keys.c
index fdcdbbc..05a07e2 100644
--- a/src/bin/options_keys.c
+++ b/src/bin/options_keys.c
@@ -48,10 +48,11 @@ _shortcut_button_add(Evas_Object *bx, const Config_Keys *key)
const char *txt;
Evas_Object *hs;
- txt = eina_stringshare_printf("%s%s%s%s",
+ txt = eina_stringshare_printf("%s%s%s%s%s",
key->ctrl ? _("Ctrl+") : "",
key->alt ? _("Alt+") : "",
key->shift ? _("Shift+") : "",
+ key->win ? _("Win+") : "",
key->keyname);
hs = elm_hoversel_add(_fr);
elm_hoversel_hover_parent_set(hs, _fr);
@@ -72,7 +73,7 @@ _cb_key_up(void *data, Evas *e EINA_UNUSED,
Evas_Object *obj, void *event)
{
Evas_Event_Key_Up *ev = event;
- int ctrl, alt, shift, res;
+ int ctrl, alt, shift, win, res;
Config_Keys *cfg_key;
Shortcut_Action *action;
Evas_Object *bx = data;
@@ -83,6 +84,7 @@ _cb_key_up(void *data, Evas *e EINA_UNUSED,
ctrl = evas_key_modifier_is_set(ev->modifiers, "Control");
alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
+ win = evas_key_modifier_is_set(ev->modifiers, "Super");
_hover_del(obj);
@@ -100,6 +102,7 @@ _cb_key_up(void *data, Evas *e EINA_UNUSED,
cfg_key->ctrl = ctrl;
cfg_key->alt = alt;
cfg_key->shift = shift;
+ cfg_key->win = win;
cfg_key->cb = eina_stringshare_add(action->action);
res = keyin_add_config(cfg_key);