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>
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 588ef78..0cbf531 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -228,6 +228,8 @@
}
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 @@
case keytype_symbols:
break;
case keytype_tab:
+ input_method_context_key(keyboard->keyboard->context,
+ XKB_KEY_Tab, WL_KEYBOARD_KEY_STATE_PRESSED);
break;
}
}