diff options
author | Zandr Martin <zandrmartin+git@gmail.com> | 2016-06-04 13:35:41 -0500 |
---|---|---|
committer | Zandr Martin <zandrmartin+git@gmail.com> | 2016-06-04 13:35:41 -0500 |
commit | 6e7659ba1396ce8277e94d2b99ec774709fbac75 (patch) | |
tree | 981bebdbb771c9930d830cbbc45a3bf31cc738cb /swaylock | |
parent | Merge pull request #695 from zandrmartin/document-client-commands (diff) | |
download | sway-6e7659ba1396ce8277e94d2b99ec774709fbac75.tar.gz sway-6e7659ba1396ce8277e94d2b99ec774709fbac75.tar.zst sway-6e7659ba1396ce8277e94d2b99ec774709fbac75.zip |
make numpad enter key work in swaylock
see issue #647
Diffstat (limited to 'swaylock')
-rw-r--r-- | swaylock/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index cc543056..b5ce63ef 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -119,6 +119,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod | |||
119 | 119 | ||
120 | if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { | 120 | if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { |
121 | switch (sym) { | 121 | switch (sym) { |
122 | case XKB_KEY_KP_Enter: // fallthrough | ||
122 | case XKB_KEY_Return: | 123 | case XKB_KEY_Return: |
123 | render_data.auth_state = AUTH_STATE_VALIDATING; | 124 | render_data.auth_state = AUTH_STATE_VALIDATING; |
124 | 125 | ||
@@ -159,7 +160,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod | |||
159 | case XKB_KEY_Super_L: // fallthrough | 160 | case XKB_KEY_Super_L: // fallthrough |
160 | case XKB_KEY_Super_R: // fallthrough | 161 | case XKB_KEY_Super_R: // fallthrough |
161 | case XKB_KEY_Hyper_L: // fallthrough | 162 | case XKB_KEY_Hyper_L: // fallthrough |
162 | case XKB_KEY_Hyper_R: // fallthrough | 163 | case XKB_KEY_Hyper_R: |
163 | { | 164 | { |
164 | // don't draw screen on modifier keys | 165 | // don't draw screen on modifier keys |
165 | break; | 166 | break; |
@@ -360,7 +361,7 @@ int main(int argc, char **argv) { | |||
360 | { | 361 | { |
361 | int colorlen = strlen(optarg); | 362 | int colorlen = strlen(optarg); |
362 | if (colorlen < 6 || colorlen == 7 || colorlen > 8) { | 363 | if (colorlen < 6 || colorlen == 7 || colorlen > 8) { |
363 | sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, e.g. rrggbb or rrggbbaa"); | 364 | sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, i.e. rrggbb or rrggbbaa"); |
364 | exit(EXIT_FAILURE); | 365 | exit(EXIT_FAILURE); |
365 | } | 366 | } |
366 | render_data.color = strtol(optarg, NULL, 16); | 367 | render_data.color = strtol(optarg, NULL, 16); |