Changeset b987eb4 in mainline for uspace/srv


Ignore:
Timestamp:
2022-03-11T16:42:03Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3b48f4
Parents:
c38ab6c
Message:

Translate keys to characters even if modifiers are pressed.

So that we can match Alt-key to menu accelerators. Of course
this means clients must check Ctrl and Alt state to determine
if they should insert characters, not just just kbd_event_t.c.

Location:
uspace/srv/hid/input/layout
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/layout/ar.c

    rc38ab6c rb987eb4  
    216216        char32_t c;
    217217
    218         /* Produce no characters when Ctrl or Alt is pressed. */
    219         if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)
    220                 return 0;
    221 
    222218        c = translate(ev->key, map_neutral, sizeof(map_neutral) / sizeof(char32_t));
    223219        if (c != 0)
  • uspace/srv/hid/input/layout/cz.c

    rc38ab6c rb987eb4  
    322322        char32_t c;
    323323
    324         /* Produce no characters when Ctrl or Alt is pressed. */
    325         if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)
    326                 return 0;
    327 
    328324        if (ev->key == KC_EQUALS) {
    329325                if ((ev->mods & KM_SHIFT) != 0)
  • uspace/srv/hid/input/layout/fr_azerty.c

    rc38ab6c rb987eb4  
    223223static char32_t fr_azerty_parse_ev (layout_t *s, kbd_event_t *e)
    224224{
    225         if ((e->mods & (KM_CTRL | KM_ALT)))
    226                 return 0; // Produce no characters when Ctrl or Alt is pressed
    227 
    228225        char32_t c = translate (e->key, map_neutral, sizeof (map_neutral) / sizeof (char32_t));
    229226        if (c)
  • uspace/srv/hid/input/layout/us_dvorak.c

    rc38ab6c rb987eb4  
    225225        char32_t c;
    226226
    227         /* Produce no characters when Ctrl or Alt is pressed. */
    228         if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)
    229                 return 0;
    230 
    231227        c = translate(ev->key, map_neutral, sizeof(map_neutral) / sizeof(char32_t));
    232228        if (c != 0)
  • uspace/srv/hid/input/layout/us_qwerty.c

    rc38ab6c rb987eb4  
    219219        char32_t c;
    220220
    221         /* Produce no characters when Ctrl or Alt is pressed. */
    222         if ((ev->mods & (KM_CTRL | KM_ALT)) != 0)
    223                 return 0;
    224 
    225221        c = translate(ev->key, map_neutral, sizeof(map_neutral) / sizeof(char32_t));
    226222        if (c != 0)
Note: See TracChangeset for help on using the changeset viewer.