mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-05 13:29:47 -05:00
Use wl_display_run and refactor example keyboards
This commit is contained in:
parent
8ce9237c92
commit
f5423a51b5
6 changed files with 6 additions and 51 deletions
|
|
@ -107,9 +107,6 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
|
|||
// Also, key repeat
|
||||
if (key_state == WLR_KEY_PRESSED) {
|
||||
switch (sym) {
|
||||
case XKB_KEY_Escape:
|
||||
kbstate->compositor->exit = true;
|
||||
break;
|
||||
case XKB_KEY_Left:
|
||||
update_velocities(kbstate->compositor, -16, 0);
|
||||
break;
|
||||
|
|
@ -123,10 +120,6 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
|
|||
update_velocities(kbstate->compositor, 0, 16);
|
||||
break;
|
||||
}
|
||||
|
||||
if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
|
||||
wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue