summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZandr Martin <zandrmartin+git@gmail.com>2016-06-04 13:35:41 -0500
committerZandr Martin <zandrmartin+git@gmail.com>2016-06-04 13:35:41 -0500
commit6c1182716b85e0e90fef7195f5cee0c7b280cbb5 (patch)
tree0ff8e52c4f86a9c156b9a3b04c0a72fb369843c0
parent51d7c9bc005e6f0afc753e1787baa9e13254bda2 (diff)
make numpad enter key work in swaylock
see issue #647
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index cc54305..b5ce63e 100644
--- a/main.c
+++ b/main.c
@@ -119,6 +119,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
switch (sym) {
+ case XKB_KEY_KP_Enter: // fallthrough
case XKB_KEY_Return:
render_data.auth_state = AUTH_STATE_VALIDATING;
@@ -159,7 +160,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
case XKB_KEY_Super_L: // fallthrough
case XKB_KEY_Super_R: // fallthrough
case XKB_KEY_Hyper_L: // fallthrough
- case XKB_KEY_Hyper_R: // fallthrough
+ case XKB_KEY_Hyper_R:
{
// don't draw screen on modifier keys
break;
@@ -360,7 +361,7 @@ int main(int argc, char **argv) {
{
int colorlen = strlen(optarg);
if (colorlen < 6 || colorlen == 7 || colorlen > 8) {
- sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, e.g. rrggbb or rrggbbaa");
+ sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, i.e. rrggbb or rrggbbaa");
exit(EXIT_FAILURE);
}
render_data.color = strtol(optarg, NULL, 16);