From: Jaeun Choi Date: Tue, 1 Apr 2014 02:10:25 +0000 (+0900) Subject: check, colorselector, calendar, diskselector: apply key binding X-Git-Tag: v1.10.0-alpha1~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=684d1d137ff8045b54cb80b465c4839dac90261f;p=platform%2Fupstream%2Felementary.git check, colorselector, calendar, diskselector: apply key binding Summary: apply key binding to 4 widgets this revision is only for reviewing I'll send 4 seperate patches after review is done. Test Plan: None Reviewers: Hermet, seoz, raster Differential Revision: https://phab.enlightenment.org/D678 --- diff --git a/config/default/base.src b/config/default/base.src index c786049..f8ca711 100644 --- a/config/default/base.src +++ b/config/default/base.src @@ -280,6 +280,341 @@ group "Elm_Config" struct { } } group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Calendar"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Check"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Return"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Enter"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "space"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Colorselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Diskselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { value "name" string: "Elm_Panel"; group "key_bindings" list { group "Elm_Config_Binding_Key" struct { diff --git a/config/mobile/base.src b/config/mobile/base.src index 60a1521..5192c56 100644 --- a/config/mobile/base.src +++ b/config/mobile/base.src @@ -284,6 +284,341 @@ group "Elm_Config" struct { } } group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Calendar"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Check"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Return"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Enter"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "space"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Colorselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Diskselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { value "name" string: "Elm_Panel"; group "key_bindings" list { group "Elm_Config_Binding_Key" struct { diff --git a/config/standard/base.src b/config/standard/base.src index 838d958..b2e68d3 100644 --- a/config/standard/base.src +++ b/config/standard/base.src @@ -281,6 +281,341 @@ group "Elm_Config" struct { } } group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Calendar"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Prior"; + value "action" string: "move"; + value "params" string: "prior"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Next"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Check"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Return"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Enter"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "space"; + value "action" string: "activate"; + value "params" string: ""; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Colorselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "right"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "up"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "down"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { + value "name" string: "Elm_Diskselector"; + group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Up"; + value "action" string: "move"; + value "params" string: "prev"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Right"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Down"; + value "action" string: "move"; + value "params" string: "next"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_Home"; + value "action" string: "move"; + value "params" string: "first"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 0; + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "modifiers" string: "None"; + value "key" string: "KP_End"; + value "action" string: "move"; + value "params" string: "last"; + value "any_mod" uchar: 1; + value "no_string" uchar: 1; + } + } + } + group "Elm_Config_Bindings_Widget" struct { value "name" string: "Elm_Panel"; group "key_bindings" list { group "Elm_Config_Binding_Key" struct { diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c index 1dea761..deccb47 100644 --- a/src/lib/elm_calendar.c +++ b/src/lib/elm_calendar.c @@ -24,6 +24,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {NULL, NULL} }; +static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); + +static const Elm_Action key_actions[] = { + {"move", _key_action_move}, + {NULL, NULL} +}; + /* Should not be translated, it's used if we failed * getting from locale. */ static const char *_days_abbrev[] = @@ -847,22 +854,17 @@ _update_cur_date(void *data) return ECORE_CALLBACK_RENEW; } -EOLIAN static Eina_Bool -_elm_calendar_elm_widget_event(Eo *obj, Elm_Calendar_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +static Eina_Bool +_key_action_move(Evas_Object *obj, const char *params) { - (void) src; - Evas_Event_Key_Down *ev = event_info; - - if (elm_widget_disabled_get(obj)) return EINA_FALSE; - if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; + ELM_CALENDAR_DATA_GET(obj, sd); + char *dir = params; - if ((!strcmp(ev->key, "Prior")) || - ((!strcmp(ev->key, "KP_Prior")) && (!ev->string))) + if (!strcmp(dir, "prior")) { if (_update_data(obj, EINA_TRUE, -1)) _populate(obj); } - else if ((!strcmp(ev->key, "Next")) || - ((!strcmp(ev->key, "KP_Next")) && (!ev->string))) + else if (!strcmp(dir, "next")) { if (_update_data(obj, EINA_TRUE, 1)) _populate(obj); } @@ -870,32 +872,28 @@ _elm_calendar_elm_widget_event(Eo *obj, Elm_Calendar_Data *sd, Evas_Object *src, && ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND) || (sd->selected))) { - if ((!strcmp(ev->key, "Left")) || - ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) + if (!strcmp(dir, "left")) { if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND) || ((sd->shown_time.tm_year == sd->selected_time.tm_year) && (sd->shown_time.tm_mon == sd->selected_time.tm_mon))) _update_sel_it(obj, sd->selected_it - 1); } - else if ((!strcmp(ev->key, "Right")) || - ((!strcmp(ev->key, "KP_Right")) && (!ev->string))) + else if (!strcmp(dir, "right")) { if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND) || ((sd->shown_time.tm_year == sd->selected_time.tm_year) && (sd->shown_time.tm_mon == sd->selected_time.tm_mon))) _update_sel_it(obj, sd->selected_it + 1); } - else if ((!strcmp(ev->key, "Up")) || - ((!strcmp(ev->key, "KP_Up")) && (!ev->string))) + else if (!strcmp(dir, "up")) { if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND) || ((sd->shown_time.tm_year == sd->selected_time.tm_year) && (sd->shown_time.tm_mon == sd->selected_time.tm_mon))) _update_sel_it(obj, sd->selected_it - ELM_DAY_LAST); } - else if ((!strcmp(ev->key, "Down")) || - ((!strcmp(ev->key, "KP_Down")) && (!ev->string))) + else if (!strcmp(dir, "down")) { if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND) || ((sd->shown_time.tm_year == sd->selected_time.tm_year) @@ -909,6 +907,23 @@ _elm_calendar_elm_widget_event(Eo *obj, Elm_Calendar_Data *sd, Evas_Object *src, return EINA_TRUE; } +EOLIAN static Eina_Bool +_elm_calendar_elm_widget_event(Eo *obj, Elm_Calendar_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +{ + (void) src; + Evas_Event_Key_Down *ev = event_info; + + if (elm_widget_disabled_get(obj)) return EINA_FALSE; + if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; + + if (!_elm_config_key_binding_call(obj, ev, key_actions)) + return EINA_FALSE; + + ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; + return EINA_TRUE; + +} + EOLIAN static void _elm_calendar_evas_smart_calculate(Eo *obj, Elm_Calendar_Data *_pd EINA_UNUSED) { diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c index 782164a..1547501 100644 --- a/src/lib/elm_check.c +++ b/src/lib/elm_check.c @@ -38,6 +38,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {NULL, NULL} }; +static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); + +static const Elm_Action key_actions[] = { + {"activate", _key_action_activate}, + {NULL, NULL} +}; + static void _activate(Evas_Object *obj) { @@ -138,6 +145,13 @@ _elm_check_elm_layout_sizing_eval(Eo *obj, Elm_Check_Data *_pd EINA_UNUSED) evas_object_size_hint_max_set(obj, -1, -1); } +static Eina_Bool +_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) +{ + _activate(obj); + return EINA_TRUE; +} + EOLIAN static Eina_Bool _elm_check_elm_widget_event(Eo *obj, Elm_Check_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { @@ -148,15 +162,10 @@ _elm_check_elm_widget_event(Eo *obj, Elm_Check_Data *_pd EINA_UNUSED, Evas_Objec if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - if ((strcmp(ev->key, "Return")) && - (strcmp(ev->key, "KP_Enter")) && - (strcmp(ev->key, "space"))) + if (!_elm_config_key_binding_call(obj, ev, key_actions)) return EINA_FALSE; - _activate(obj); - ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - return EINA_TRUE; } diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c index ec80ad0..d908a79 100644 --- a/src/lib/elm_colorselector.c +++ b/src/lib/elm_colorselector.c @@ -34,6 +34,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {NULL, NULL} }; +static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); + +static const Elm_Action key_actions[] = { + {"move", _key_action_move}, + {NULL, NULL} +}; + enum Palette_Box_Direction { PALETTE_BOX_UP, @@ -1656,42 +1663,34 @@ _palette_box_vertical_item_get(Eina_List* ref_item, enum Palette_Box_Direction d return res; } -EOLIAN static Eina_Bool -_elm_colorselector_elm_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +static Eina_Bool +_key_action_move(Evas_Object *obj, const char *params) { - Evas_Event_Key_Down *ev = event_info; + ELM_COLORSELECTOR_DATA_GET(obj, sd); Eina_List *cl = NULL; Elm_Color_Item *item = NULL; char colorbar_s[128]; + char *dir = params; - (void) src; - - if (elm_widget_disabled_get(obj)) return EINA_FALSE; - if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; - if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - if (!sd) return EINA_FALSE; - if (!sd->selected) sd->selected = sd->items; - - if ((!strcmp(ev->key, "Left")) || - ((!strcmp(ev->key, "KP_Left")) && (!ev->string))) + if (!strcmp(dir, "left")) { if (sd->focused == ELM_COLORSELECTOR_PALETTE && sd->selected) cl = eina_list_prev(sd->selected); - else if (sd->focused == ELM_COLORSELECTOR_COMPONENTS) - _button_clicked_cb(sd->cb_data[sd->sel_color_type], sd->cb_data[sd->sel_color_type]->lbt, NULL); + else if (sd->focused == ELM_COLORSELECTOR_COMPONENTS) + _button_clicked_cb(sd->cb_data[sd->sel_color_type], + sd->cb_data[sd->sel_color_type]->lbt, NULL); else return EINA_FALSE; } - else if ((!strcmp(ev->key, "Right")) || - ((!strcmp(ev->key, "KP_Right")) && (!ev->string))) + else if (!strcmp(dir, "right")) { if (sd->focused == ELM_COLORSELECTOR_PALETTE && sd->selected) cl = eina_list_next(sd->selected); else if (sd->focused == ELM_COLORSELECTOR_COMPONENTS) - _button_clicked_cb(sd->cb_data[sd->sel_color_type], sd->cb_data[sd->sel_color_type]->rbt, NULL); + _button_clicked_cb(sd->cb_data[sd->sel_color_type], + sd->cb_data[sd->sel_color_type]->rbt, NULL); else return EINA_FALSE; } - else if ((!strcmp(ev->key, "Up")) || - ((!strcmp(ev->key, "KP_Up")) && (!ev->string))) + else if (!strcmp(dir, "up")) { if (sd->focused == ELM_COLORSELECTOR_COMPONENTS) { @@ -1719,8 +1718,7 @@ _elm_colorselector_elm_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Ob if (!cl) cl = sd->selected; } } - else if ((!strcmp(ev->key, "Down")) || - ((!strcmp(ev->key, "KP_Down")) && (!ev->string))) + else if (!strcmp(dir, "down")) { if (sd->focused == ELM_COLORSELECTOR_PALETTE) { @@ -1744,6 +1742,7 @@ _elm_colorselector_elm_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Ob } } else return EINA_FALSE; + if (cl) { item = eina_list_data_get(cl); @@ -1758,6 +1757,28 @@ _elm_colorselector_elm_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Ob else if (!cl && sd->focused == ELM_COLORSELECTOR_PALETTE) return EINA_FALSE; + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_elm_colorselector_elm_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +{ + Evas_Event_Key_Down *ev = event_info; + Eina_List *cl = NULL; + Elm_Color_Item *item = NULL; + char colorbar_s[128]; + + (void) src; + + if (elm_widget_disabled_get(obj)) return EINA_FALSE; + if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; + if (!sd) return EINA_FALSE; + if (!sd->selected) sd->selected = sd->items; + + if (!_elm_config_key_binding_call(obj, ev, key_actions)) + return EINA_FALSE; + ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; return EINA_TRUE; } diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index a7015bc..2193cfb 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -35,6 +35,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {NULL, NULL} }; +static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); + +static const Elm_Action key_actions[] = { + {"move", _key_action_move}, + {NULL, NULL} +}; + EOLIAN static Eina_Bool _elm_diskselector_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Diskselector_Data *sd) { @@ -918,48 +925,29 @@ _elm_diskselector_elm_widget_focus_next(Eo *obj, Elm_Diskselector_Data *sd, Elm_ return EINA_TRUE; } -EOLIAN static Eina_Bool -_elm_diskselector_elm_widget_event(Eo *obj, Elm_Diskselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +static Eina_Bool +_key_action_move(Evas_Object *obj, const char *params) { + ELM_DISKSELECTOR_DATA_GET(obj, sd); Elm_Diskselector_Item *it = NULL; - Eina_List *l; - Evas_Event_Key_Down *ev = event_info; - - (void) src; - - if (elm_widget_disabled_get(obj)) return EINA_FALSE; - if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; - if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - - if (!sd->selected_item) - { - ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; - return EINA_TRUE; - } + Eina_List *l = NULL; + char *dir = params; - if ((!strcmp(ev->key, "Left")) || - ((!strcmp(ev->key, "KP_Left")) && (!ev->string)) || - (!strcmp(ev->key, "Up")) || - ((!strcmp(ev->key, "KP_Up")) && (!ev->string))) + if (!strcmp(dir, "prev")) { l = sd->selected_item->node->prev; if ((!l) && (sd->round)) l = eina_list_last(sd->items); } - else if ((!strcmp(ev->key, "Right")) || - ((!strcmp(ev->key, "KP_Right")) && (!ev->string)) || - (!strcmp(ev->key, "Down")) || - ((!strcmp(ev->key, "KP_Down")) && (!ev->string))) + else if (!strcmp(dir, "next")) { l = sd->selected_item->node->next; if ((!l) && (sd->round)) l = sd->items; } - else if ((!strcmp(ev->key, "Home")) || - ((!strcmp(ev->key, "KP_Home")) && (!ev->string))) + else if (!strcmp(dir, "first")) l = sd->items; - else if ((!strcmp(ev->key, "End")) || - ((!strcmp(ev->key, "KP_End")) && (!ev->string))) + else if (!strcmp(dir, "last")) l = eina_list_last(sd->items); else return EINA_FALSE; @@ -973,6 +961,29 @@ _elm_diskselector_elm_widget_event(Eo *obj, Elm_Diskselector_Data *sd, Evas_Obje sd->scroller_move_idle_enterer = ecore_idle_enterer_before_add(_scroller_move, obj); } + return EINA_TRUE; +} + +EOLIAN static Eina_Bool +_elm_diskselector_elm_widget_event(Eo *obj, Elm_Diskselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +{ + Evas_Event_Key_Down *ev = event_info; + + (void) src; + + if (elm_widget_disabled_get(obj)) return EINA_FALSE; + if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; + + if (!sd->selected_item) + { + ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; + return EINA_TRUE; + } + + if (!_elm_config_key_binding_call(obj, ev, key_actions)) + return EINA_FALSE; + ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; return EINA_TRUE; }