summaryrefslogtreecommitdiff
path: root/clients/keyboard.c
diff options
context:
space:
mode:
authorJan Arne Petersen <jpetersen@openismus.com>2012-09-09 23:08:45 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-09-12 16:52:41 -0400
commitce8a4433f53feb2db8e9e9e0a06dda4e28156faf (patch)
tree71afecb1b5e2c4f07f8815d34caa872b56bea3db /clients/keyboard.c
parente202bae9d3736341dc2d0c832797aaf45e1ef0b0 (diff)
downloadweston-ce8a4433f53feb2db8e9e9e0a06dda4e28156faf.tar.gz
weston-ce8a4433f53feb2db8e9e9e0a06dda4e28156faf.tar.bz2
weston-ce8a4433f53feb2db8e9e9e0a06dda4e28156faf.zip
text: Add support for control keys to the protocol
Add key event to the text_model interface and a key request to the input_method_context interface. Implement it in the example editor client and the example keyboard. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'clients/keyboard.c')
-rw-r--r--clients/keyboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 588ef785..0cbf531c 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -228,6 +228,8 @@ keyboard_handle_key(struct keyboard *keyboard, const struct key *key)
}
break;
case keytype_enter:
+ input_method_context_key(keyboard->keyboard->context,
+ XKB_KEY_KP_Enter, WL_KEYBOARD_KEY_STATE_PRESSED);
break;
case keytype_space:
keyboard->keyboard->preedit_string = strcat(keyboard->keyboard->preedit_string,
@@ -250,6 +252,8 @@ keyboard_handle_key(struct keyboard *keyboard, const struct key *key)
case keytype_symbols:
break;
case keytype_tab:
+ input_method_context_key(keyboard->keyboard->context,
+ XKB_KEY_Tab, WL_KEYBOARD_KEY_STATE_PRESSED);
break;
}
}