aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input/smiley_converter.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/chat_input/smiley_converter.vala')
-rw-r--r--main/src/ui/chat_input/smiley_converter.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/chat_input/smiley_converter.vala b/main/src/ui/chat_input/smiley_converter.vala
index 8f4dee9a..fe280d99 100644
--- a/main/src/ui/chat_input/smiley_converter.vala
+++ b/main/src/ui/chat_input/smiley_converter.vala
@@ -33,11 +33,13 @@ class SmileyConverter {
public SmileyConverter(TextView text_input) {
this.text_input = text_input;
- text_input.key_press_event.connect(on_text_input_key_press);
+ var text_input_key_events = new EventControllerKey();
+ text_input_key_events.key_pressed.connect(on_text_input_key_press);
+ text_input.add_controller(text_input_key_events);
}
- public bool on_text_input_key_press(EventKey event) {
- if (event.keyval == Key.space || event.keyval == Key.Return) {
+ public bool on_text_input_key_press(uint keyval, uint keycode, Gdk.ModifierType state) {
+ if (keyval == Key.space || keyval == Key.Return) {
check_convert();
}
return false;