Commit Graph
50 Commits
Author SHA1 Message Date
Kovid Goyal 3728d2cfd9 Add changelog entry for previous PR 2021-09-29 19:43:33 +05:30
Park, Jeongmin 4232904055 ibus: Add support for ForwardKeyEvent signal
The ForwardKeyEvent ibus signal is used to maintain ordering between CommitText events and non-IME key events.
The ordering is important for Korean IMEs, where it automatically commits text whenever a character is fully composed. This is different from Chinese/Japanese IMEs, where user manually presses a key to commit each word.

Without this patch, kitty can't handle non-IME key events when used with ibus-hangul, which utilizes ForwardKeyEvent signal.

Without ForwardKeyEvent:
```
key | sequence of events from application's view
r   | UpdatePreeditText 'ㄱ'
k   | UpdatePreeditText '가'
1   | (receives the reply to ProcessKeyEvent call: "native_key: 0x31 release: 0 handled: 0")
    | -> UpdatePreeditText ''
    | -> CommitText '가'
```
Application receives "1가", which is incorrect.

With ForwardKeyEvent:
```
key | sequence of events from application's view
r   | UpdatePreeditText 'ㄱ'
k   | UpdatePreeditText '가'
1   | (receives the reply to ProcessKeyEvent call: "native_key: 0x31 release: 0 handled: 1", and kitty discards the event)
    | -> UpdatePreeditText ''
    | -> CommitText '가'
    | -> ForwardKeyEvent keysym=0x31("1")
```
Application receives "가1", which is correct.

Relevant ibus-hangul github issue to implement ForwardKeyEvent: https://github.com/libhangul/ibus-hangul/issues/42
Relevant changes in Qt to handle ForwardKeyEvent: https://codereview.qt-project.org/c/qt/qtbase/+/212179, https://codereview.qt-project.org/c/qt/qtbase/+/255587
2021-09-29 21:20:09 +09:00
Kovid Goyal a038477ce0 Cleanup previous PR 2021-09-26 11:17:54 +05:30
unisgn d078cb264a Update ibus_glfw.c 2021-09-25 00:10:53 +08:00
unisgn c45a656153 ibus's dbus name owner changed detection
fcitx5 works fine with kitty, except that when you restart fcitx5, kitty stop working with fcitx5, because the dbus_connection_get_is_connected(ibus->conn) in #check_connection is always true when you use fcitx5.
this patch add a dbus name owner changed detection to detect the online status of ibus, in case the ibus backend uses the session bus, like fcitx5.
2021-09-24 23:10:38 +08:00
Kovid Goyal be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Ravi R Kiran b074533b29 Fix regression 2021-03-31 08:54:10 -05:00
Ravi R Kiran 953253de99 Implementation of hyper and meta 2021-03-30 14:23:17 -05:00
Kovid Goyal 84dcf8fd27 Use an enum for ime_state 2021-03-23 10:42:07 +05:30
Kovid Goyal abc1e3f289 Remove the function used to init glfw key events
Instead use C99 struct initializers. Much less error prone.
2021-01-16 20:52:14 +05:30
Kovid Goyal 774a6c8c8b Remove glfw key constants 2021-01-16 20:52:12 +05:30
Weng Xuetian b1387d50f0 Register to bus when connect to ibus.
This is required when the actual dbus is not from ibus but session bus.
This may happen when other run a shim layer for ibus, or ibus is
running with flatpak mode.
2020-07-31 17:54:10 -07:00
Benoit de Chezelles 7f2b98fad7 Rename all uses of 'scancode' to 'native_key' where relevant 2019-10-16 02:25:20 +02:00
Kovid Goyal 4ec1a8d9c3 Merge branch 'extract-glfw-key-event-data' of https://github.com/bew/kitty 2019-09-25 15:44:56 +05:30
Benoit de Chezelles 53275c9137 Extract key event data to struct 2019-09-24 19:15:35 +02:00
Luflosi 28bb123be8 Update the GLFW version number from 3.3 to 3.4
Closes https://github.com/kovidgoyal/kitty/issues/1884.
From https://github.com/glfw/glfw/commit/a337c568486025d22443535b7c047a563bc34373.
2019-08-02 11:00:16 -05:00
Kovid Goyal 841c907efc Build glfw with all warnings enabled 2019-07-01 10:42:07 +05:30
Kovid Goyal 0fafc07db0 Fix #1702 2019-06-11 15:30:50 +05:30
Kovid Goyal 47acc9ff2f Get rid of GLFW_(TRUE|FALSE) 2019-06-08 08:14:30 +05:30
Kovid Goyal fe62700825 Get rid of GLFWbool 2019-06-08 08:12:42 +05:30
Luflosi a653c17e8a Fix function returning the wrong type 2019-02-22 15:13:13 +01:00
Kovid Goyal 0fa12a687d Linux: Turn off IME unless the GLFW_IM_MODULE=ibus env var is set 2018-09-07 16:07:01 +05:30
Kovid Goyal ddd8209c45 Fix crash when pressing enter while using IBUS 2018-08-06 10:35:46 +05:30
Kovid Goyal cb289125ab Use _GNU_SOURCE instead of POSIX_SOURCE for fileno()
Maybe that will work with FreeBSD
2018-07-29 21:43:02 +05:30
Kovid Goyal 1ca49b9380 Fix #761 2018-07-29 12:15:21 +05:30
Kovid Goyal 97401f843a Sigh. Apparently _XOPEN_SOURCE is needed on older linux systems for fileno() 2018-07-28 23:54:23 +05:30
Kovid Goyal 02635d506e Dont use _XOPEN_SOURCE when building
Apparently it has exactly opposite semantics for glibc and whatever libcs
are used on BSD. What a clusterfuck.
2018-07-28 22:56:18 +05:30
Kovid Goyal bd4831e2ee Some explicit includes needed for FreeBSD 2018-07-26 19:50:38 +05:30
Kovid Goyal 037bfeff82 Give IBUS a maximum of three seconds to respond to a key press
Previously was using the default timeout, which is 25 seconds
2018-07-12 18:18:21 +05:30
Kovid Goyal 98ede457a0 Do not hand on startup if the ibus daemon is hung 2018-07-12 18:18:21 +05:30
Kovid Goyal 6e9aecdff3 Fix Shift key not working with IBUS
Fixes #721
2018-07-12 18:18:20 +05:30
Kovid Goyal 95187632bf Allow using GLFW_IM_MODULE to activate ibus 2018-07-12 18:18:20 +05:30
Kovid Goyal c6c6a18375 Handle keys returned by IBUS 2018-07-12 18:18:19 +05:30
Kovid Goyal 56063b283e Implement text commit from the IME system 2018-07-12 18:18:19 +05:30
Kovid Goyal 342164ede1 Add API for the application to notify the IME system of state changes 2018-07-12 18:18:19 +05:30
Kovid Goyal 377115a594 Add a GLFW specific env var to toggle IBUS 2018-07-12 18:18:19 +05:30
Kovid Goyal e405b68da1 ... 2018-07-12 18:18:18 +05:30
Kovid Goyal d875d7baed Implement the handler for ibus signals 2018-07-12 18:18:18 +05:30
Kovid Goyal 9c48e4965c Send key events to ibus 2018-07-12 18:18:18 +05:30
Kovid Goyal 8675659fcb Fix remaining sync BUS calls
Also work on IBUS integration
2018-07-12 18:18:18 +05:30
Kovid Goyal 3b226618ad Ensure no ibus comms take place till the connection is fully setup 2018-07-12 18:18:18 +05:30
Kovid Goyal 6879a492dc Give watches and timers names to ease debugging 2018-07-12 18:18:18 +05:30
Kovid Goyal dd9e484336 Make the DBUS APIs async 2018-07-12 18:18:18 +05:30
Kovid Goyal 78cda7aa74 Implement dispatch for the IBUS connection 2018-07-12 18:18:17 +05:30
Kovid Goyal 3a4b614ae0 IBUS does not need a connection to the DBUS session bus 2018-07-12 18:18:16 +05:30
Kovid Goyal 26a6d6bef9 Set startup IBUS cursor and focus state 2018-07-12 18:18:16 +05:30
Kovid Goyal dca81589a7 Finish code to connect to IBUS daemon 2018-07-12 18:18:16 +05:30
Kovid Goyal 5b7c697dfe Connect to IBUS 2018-07-12 18:18:16 +05:30
Kovid Goyal 18d6b8a0ad Code to read the IBUS address 2018-07-12 18:18:16 +05:30
Kovid Goyal cdee601137 Start work on IBUS support 2018-07-12 18:18:16 +05:30