On Fri, 29 Jun 2012 09:45:40 +0200 Sebastian Dransfeld <[email protected]>
said:

> On 06/29/2012 06:34 AM, Carsten Haitzler (The Rasterman) wrote:
> > On Wed, 27 Jun 2012 12:58:45 +0200 Sebastian Dransfeld 
> > <[email protected]>
> > said:
> >
> > this seems right to me. the only thing i might have done is call it ALTGR
> > not MODE. comments?
> 
> Already changed the name :)

panties on! :)

> >> Hi,
> >>
> >> I'm not sure if it is the correct fix and documented correctly, but
> >> something needs to be fixed. On many keyboards there is an AltGr key (
> >> http://en.wikipedia.org/wiki/Altgr) which is used to get a 3rd character
> >> from a key (so it is also called ISO_Level3_Shift in x.org).
> >>
> >> This modifier wasn't correctly setup in ecore_x (or it could be mapped
> >> to _win if the Super key wasn't there). So it must be setup there to be
> >> available.
> >>
> >> In addition the xim module passed of the Windows key as Mod5, but
> >> according to my xmodmap, windows key is Mod4 and AltGr is Mod5.
> >>
> >> sd@work-sd:~> xmodmap
> >> xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):
> >>
> >> shift       Shift_L (0x32),  Shift_R (0x3e)
> >> lock        Caps_Lock (0x42)
> >> control     Control_L (0x25),  Control_R (0x69)
> >> mod1        Alt_L (0x40),  Meta_L (0xcd)
> >> mod2        Num_Lock (0x4d)
> >> mod3
> >> mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L
> >> (0xcf)
> >> mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
> >>
> >> I guess this is standard.
> >>
> >> S.
> >>
> >> On 06/27/2012 12:47 PM, Enlightenment SVN wrote:
> >>> Log:
> >>> ecore: Fix support for intl keyboards
> >>>
> >>>     Map XK_Mode_switch to new modifier and use it to match AltGr key. In
> >>>     ecore_imf xim module this key should be reported as Mod5Mask, and
> >>>     windows key as Mod4Mask.
> >>>
> >>>     Does none of the e developers use international keyboards?
> >>>
> >>> Author:       englebass
> >>> Date:         2012-06-27 03:47:57 -0700 (Wed, 27 Jun 2012)
> >>> New Revision: 72937
> >>> Trac:         http://trac.enlightenment.org/e/changeset/72937
> >>>
> >>> Modified:
> >>>     trunk/ecore/src/lib/ecore_imf/Ecore_IMF.h
> >>> trunk/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c
> >>> trunk/ecore/src/lib/ecore_input/Ecore_Input.h
> >>> trunk/ecore/src/lib/ecore_input/ecore_input.c
> >>> trunk/ecore/src/lib/ecore_input_evas/ecore_input_evas.c
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c
> >>> trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c
> >>> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
> >>> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
> >>> trunk/ecore/src/modules/immodules/xim/ecore_imf_xim.c
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_imf/Ecore_IMF.h
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_imf/Ecore_IMF.h     2012-06-27 10:09:50
> >>> UTC (rev 72936) +++ trunk/ecore/src/lib/ecore_imf/Ecore_IMF.h
> >>> 2012-06-27 10:47:57 UTC (rev 72937) @@ -116,7 +116,8 @@
> >>>       ECORE_IMF_KEYBOARD_MODIFIER_CTRL  = 1<<  0, /**<  "Control" is
> >>> pressed */ ECORE_IMF_KEYBOARD_MODIFIER_ALT   = 1<<  1, /**<  "Alt" is
> >>> pressed */ ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1<<  2, /**<  "Shift" is
> >>> pressed */
> >>> -   ECORE_IMF_KEYBOARD_MODIFIER_WIN   = 1<<  3  /**<  "Win" (between
> >>> "Ctrl" and "Alt") is pressed */
> >>> +   ECORE_IMF_KEYBOARD_MODIFIER_WIN   = 1<<  3, /**<  "Win" (between
> >>> "Ctrl" and "Alt") is pressed */
> >>> +   ECORE_IMF_KEYBOARD_MODIFIER_MODE  = 1<<  4  /**<  "AltGr" is pressed
> >>> @since 1.3 */ } Ecore_IMF_Keyboard_Modifiers;
> >>>
> >>>    /**
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c   2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c       2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -33,6 +33,8 @@ *imf_keyboard_modifiers |=
> >>> ECORE_IMF_KEYBOARD_MODIFIER_SHIFT; if (evas_key_modifier_is_set
> >>> (evas_modifiers, "Super") || evas_key_modifier_is_set(evas_modifiers,
> >>> "Hyper")) *imf_keyboard_modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_WIN;
> >>> +   if (evas_key_modifier_is_set(evas_modifiers, "Mode"))
> >>> +     *imf_keyboard_modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_MODE;
> >>>    }
> >>>
> >>>    /* Converts the Evas locks to Ecore_IMF keyboard locks */
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_input/Ecore_Input.h
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_input/Ecore_Input.h 2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_input/Ecore_Input.h     2012-06-27 10:47:57
> >>> UTC (rev 72937) @@ -57,6 +57,7 @@
> >>>    #define ECORE_EVENT_LOCK_NUM            0x0100
> >>>    #define ECORE_EVENT_LOCK_CAPS           0x0200
> >>>    #define ECORE_EVENT_LOCK_SHIFT          0x0300
> >>> +#define ECORE_EVENT_MODIFIER_MODE       0x0400 /**<  @since 1.3 */
> >>>
> >>>       typedef uintptr_t                        Ecore_Window;
> >>>       typedef struct _Ecore_Event_Key          Ecore_Event_Key;
> >>> @@ -75,6 +76,7 @@
> >>>            ECORE_WIN,
> >>>            ECORE_SCROLL,
> >>>            ECORE_CAPS,
> >>> +        ECORE_MODE, /**<  @since 1.3 */
> >>>            ECORE_LAST
> >>>         } Ecore_Event_Modifier;
> >>>
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_input/ecore_input.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_input/ecore_input.c 2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_input/ecore_input.c     2012-06-27 10:47:57
> >>> UTC (rev 72937) @@ -88,6 +88,7 @@ { "Caps_Lock", ECORE_CAPS,
> >>> ECORE_EVENT_MODIFIER_CAPS }, { "Super_L", ECORE_WIN,
> >>> ECORE_EVENT_MODIFIER_WIN }, { "Super_R", ECORE_WIN,
> >>> ECORE_EVENT_MODIFIER_WIN },
> >>> +  { "ISO_Level3_Shift", ECORE_MODE, ECORE_EVENT_MODIFIER_MODE },
> >>>      { "Scroll_Lock", ECORE_SCROLL, ECORE_EVENT_MODIFIER_SCROLL }
> >>>    };
> >>>
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_input_evas/ecore_input_evas.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_input_evas/ecore_input_evas.c
> >>> 2012-06-27 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_input_evas/ecore_input_evas.c   2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -55,6 +55,10 @@ evas_key_modifier_off(e,
> >>> "Hyper"); }
> >>>
> >>> +   if (modifiers&  ECORE_EVENT_MODIFIER_MODE)
> >>> +     evas_key_modifier_on(e, "Mode");
> >>> +   else evas_key_modifier_off(e, "Mode");
> >>> +
> >>>       if (modifiers&  ECORE_EVENT_LOCK_SCROLL)
> >>>         evas_key_lock_on(e, "Scroll_Lock");
> >>>       else evas_key_lock_off(e, "Scroll_Lock");
> >>> @@ -100,6 +104,7 @@
> >>>       evas_key_modifier_add(evas, "Meta");
> >>>       evas_key_modifier_add(evas, "Hyper");
> >>>       evas_key_modifier_add(evas, "Super");
> >>> +   evas_key_modifier_add(evas, "Mode");
> >>>       evas_key_lock_add(evas, "Caps_Lock");
> >>>       evas_key_lock_add(evas, "Num_Lock");
> >>>       evas_key_lock_add(evas, "Scroll_Lock");
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c    2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c        2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -550,6 +550,8 @@ modifiers |=
> >>> ECORE_EVENT_MODIFIER_ALT; if (state&  ECORE_X_MODIFIER_WIN)
> >>>         modifiers |= ECORE_EVENT_MODIFIER_WIN;
> >>> +   if (state&  ECORE_X_MODIFIER_MODE)
> >>> +     modifiers |= ECORE_EVENT_MODIFIER_MODE;
> >>>       if (state&  ECORE_X_LOCK_SCROLL)
> >>>         modifiers |= ECORE_EVENT_LOCK_SCROLL;
> >>>       if (state&  ECORE_X_LOCK_CAPS)
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c    2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c        2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -27,6 +27,7 @@ EAPI int ECORE_X_MODIFIER_CTRL
> >>> = 0; EAPI int ECORE_X_MODIFIER_ALT = 0;
> >>>    EAPI int ECORE_X_MODIFIER_WIN = 0;
> >>> +EAPI int ECORE_X_MODIFIER_MODE = 0;
> >>>    EAPI int ECORE_X_LOCK_SCROLL = 0;
> >>>    EAPI int ECORE_X_LOCK_NUM = 0;
> >>>    EAPI int ECORE_X_LOCK_CAPS = 0;
> >>> @@ -70,10 +71,10 @@
> >>>
> >>>       ECORE_X_MODIFIER_WIN = _ecore_xcb_keymap_mask_get(reply,
> >>> XK_Super_L); if (!ECORE_X_MODIFIER_WIN)
> >>> -     ECORE_X_MODIFIER_WIN = _ecore_xcb_keymap_mask_get(reply,
> >>> XK_Mode_switch);
> >>> -   if (!ECORE_X_MODIFIER_WIN)
> >>>         ECORE_X_MODIFIER_WIN = _ecore_xcb_keymap_mask_get(reply,
> >>> XK_Meta_L);
> >>>
> >>> +   ECORE_X_MODIFIER_MODE = _ecore_xcb_keymap_mask_get(reply,
> >>> XK_Mode_switch); +
> >>>       if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
> >>>         ECORE_X_MODIFIER_WIN = 0;
> >>>       if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h   2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h       2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -213,6 +213,7 @@ extern int
> >>> ECORE_X_MODIFIER_CTRL; extern int ECORE_X_MODIFIER_ALT;
> >>>    extern int ECORE_X_MODIFIER_WIN;
> >>> +extern int ECORE_X_MODIFIER_MODE;
> >>>    extern int ECORE_X_LOCK_SCROLL;
> >>>    extern int ECORE_X_LOCK_NUM;
> >>>    extern int ECORE_X_LOCK_CAPS;
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c    2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c        2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -2186,6 +2186,8 @@ xmodifiers |=
> >>> ECORE_X_MODIFIER_ALT; if (state&  ECORE_EVENT_MODIFIER_WIN)
> >>>         xmodifiers |= ECORE_X_MODIFIER_WIN;
> >>> +   if (state&  ECORE_EVENT_MODIFIER_MODE)
> >>> +     xmodifiers |= ECORE_X_MODIFIER_MODE;
> >>>       if (state&  ECORE_EVENT_LOCK_SCROLL)
> >>>         xmodifiers |= ECORE_X_LOCK_SCROLL;
> >>>       if (state&  ECORE_EVENT_LOCK_NUM)
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c    2012-06-27 10:09:50
> >>> UTC (rev 72936) +++ trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c
> >>> 2012-06-27 10:47:57 UTC (rev 72937) @@ -130,6 +130,7 @@
> >>>    int ECORE_X_MODIFIER_CTRL = 0;
> >>>    int ECORE_X_MODIFIER_ALT = 0;
> >>>    int ECORE_X_MODIFIER_WIN = 0;
> >>> +int ECORE_X_MODIFIER_MODE = 0;
> >>>
> >>>    EAPI int ECORE_X_LOCK_SCROLL = 0;
> >>>    EAPI int ECORE_X_LOCK_NUM = 0;
> >>> @@ -217,8 +218,9 @@
> >>>    {
> >>>    #ifdef ECORE_XKB
> >>>       return XkbKeycodeToKeysym(display, keycode, 0, idx);
> >>> +#else
> >>> +   return XKeycodeToKeysym(display, keycode, idx);
> >>>    #endif
> >>> -   return XKeycodeToKeysym(display, keycode, idx);
> >>>    }
> >>>
> >>>    void
> >>> @@ -239,11 +241,10 @@
> >>>       /* the windows key... a valid modifier :) */
> >>>       ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
> >>>       if (!ECORE_X_MODIFIER_WIN)
> >>> -     ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
> >>> -
> >>> -   if (!ECORE_X_MODIFIER_WIN)
> >>>         ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
> >>>
> >>> +   ECORE_X_MODIFIER_MODE = _ecore_x_key_mask_get(XK_Mode_switch);
> >>> +
> >>>       if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
> >>>         ECORE_X_MODIFIER_WIN = 0;
> >>>
> >>> @@ -2155,6 +2156,9 @@
> >>>       if (state&  ECORE_EVENT_MODIFIER_WIN)
> >>>         xmodifiers |= ECORE_X_MODIFIER_WIN;
> >>>
> >>> +   if (state&  ECORE_EVENT_MODIFIER_MODE)
> >>> +     xmodifiers |= ECORE_X_MODIFIER_MODE;
> >>> +
> >>>       if (state&  ECORE_EVENT_LOCK_SCROLL)
> >>>         xmodifiers |= ECORE_X_LOCK_SCROLL;
> >>>
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x_events.c     2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_events.c 2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -183,6 +183,9 @@ if (state&
> >>> ECORE_X_MODIFIER_WIN) modifiers |= ECORE_EVENT_MODIFIER_WIN;
> >>>
> >>> +   if (state&  ECORE_X_MODIFIER_MODE)
> >>> +     modifiers |= ECORE_EVENT_MODIFIER_MODE;
> >>> +
> >>>       if (state&  ECORE_X_LOCK_SCROLL)
> >>>         modifiers |= ECORE_EVENT_LOCK_SCROLL;
> >>>
> >>>
> >>> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
> >>> ===================================================================
> >>> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x_private.h    2012-06-27
> >>> 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_private.h        2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -186,6 +186,7 @@ extern int
> >>> ECORE_X_MODIFIER_CTRL; extern int ECORE_X_MODIFIER_ALT;
> >>>    extern int ECORE_X_MODIFIER_WIN;
> >>> +extern int ECORE_X_MODIFIER_MODE;
> >>>
> >>>    extern int ECORE_X_LOCK_SCROLL;
> >>>    extern int ECORE_X_LOCK_NUM;
> >>>
> >>> Modified: trunk/ecore/src/modules/immodules/xim/ecore_imf_xim.c
> >>> ===================================================================
> >>> --- trunk/ecore/src/modules/immodules/xim/ecore_imf_xim.c
> >>> 2012-06-27 10:09:50 UTC (rev 72936) +++
> >>> trunk/ecore/src/modules/immodules/xim/ecore_imf_xim.c     2012-06-27
> >>> 10:47:57 UTC (rev 72937) @@ -575,8 +575,12 @@ if (state&
> >>> ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) modifiers |= ShiftMask;
> >>>
> >>> -   /**<  "Win" (between "Ctrl" and "A */
> >>> +   /**<  "Win" (between "Ctrl" and "Alt") is pressed */
> >>>       if (state&  ECORE_IMF_KEYBOARD_MODIFIER_WIN)
> >>> +     modifiers |= Mod4Mask;
> >>> +
> >>> +   /**<  "AltGr" is pressed */
> >>> +   if (state&  ECORE_IMF_KEYBOARD_MODIFIER_MODE)
> >>>         modifiers |= Mod5Mask;
> >>>
> >>>       return modifiers;
> >>>
> >>>
> >>> ------------------------------------------------------------------------------
> >>> Live Security Virtual Conference
> >>> Exclusive live event will cover all the ways today's security and
> >>> threat landscape has changed and how IT managers can respond. Discussions
> >>> will include endpoint security, mobile security and the latest in malware
> >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >>> _______________________________________________
> >>> enlightenment-svn mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Live Security Virtual Conference
> >> Exclusive live event will cover all the ways today's security and
> >> threat landscape has changed and how IT managers can respond. Discussions
> >> will include endpoint security, mobile security and the latest in malware
> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> _______________________________________________
> >> enlightenment-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> >
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to