History

wayland: add Kmod4 support

Sigrid Solveig Haflínudóttir committed 4 years ago

Commit efe20ef1 parent 1baf2ac1 file · +6 −1Browse files

Unified · Split

gui-wl/wl-cb.c+6−1
@@ -173,6 +173,7 @@ keyboard_leave (void *data, struct wl_keyboard *keyboard, uint32_t serial, struc · 172 unmodified lines
173 kbdkey(Kshift, 0);173 kbdkey(Kshift, 0);
174 kbdkey(Kctl, 0);174 kbdkey(Kctl, 0);
175 kbdkey(Kalt, 0);175 kbdkey(Kalt, 0);
176 kbdkey(Kmod4, 0);
176 qlock(&repeatstate.lk);177 qlock(&repeatstate.lk);
177 repeatstate.active = 0;178 repeatstate.active = 0;
178 repeatstate.key = 0;179 repeatstate.key = 0;
@@ -221,6 +222,10 @@ keyboard_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t · 42 unmodified lines
221 case XKB_KEY_Shift_R:222 case XKB_KEY_Shift_R:
222 utf32 = Kshift;223 utf32 = Kshift;
223 break;224 break;
225 case XKB_KEY_Super_L:
226 case XKB_KEY_Super_R:
227 utf32 = Kmod4;
228 break;
224 case XKB_KEY_End:229 case XKB_KEY_End:
225 utf32 = Kend;230 utf32 = Kend;
226 break;231 break;
@@ -237,7 +242,7 @@ keyboard_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t · 10 unmodified lines
237 if(utf32 == 0)242 if(utf32 == 0)
238 return;243 return;
239 244
240 repeat = state && utf32 != Kctl && utf32 != Kshift && utf32 != Kalt;245 repeat = state && utf32 != Kctl && utf32 != Kshift && utf32 != Kalt && utf32 != Kmod4;
241 if(xkb_state_mod_name_is_active(wl->xkb_state, XKB_MOD_NAME_CTRL, XKB_STATE_MODS_EFFECTIVE) > 0)246 if(xkb_state_mod_name_is_active(wl->xkb_state, XKB_MOD_NAME_CTRL, XKB_STATE_MODS_EFFECTIVE) > 0)
242 if(utf32 >= 'a' && utf32 <= 'z')247 if(utf32 >= 'a' && utf32 <= 'z')
243 utf32 -= ('a' - 1);248 utf32 -= ('a' - 1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t