Closed mike-fabian closed 5 months ago
This changed again in ibus recently:
$ python3
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi import require_version
>>> require_version('IBus', '1.0')
>>>
>>> from gi.repository import IBus
>>> IBus.keyval_name(0x0100263a)
'0x100263a'
>>> f'0x{IBus.keyval_from_name('U+263A'):08x}'
'0x00ffffff'
>>> f'0x{IBus.keyval_from_name('0x100263a'):08x}'
'0x00ffffff'
>>>
Old:
>>> IBus.keyval_name(0x0100263a)
'U+263A'
New:
>>> IBus.keyval_name(0x0100263a)
'0x100263a'
mfabian@f39:~
$ python3
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi import require_version
>>> require_version('IBus', '1.0')
>>> from gi.repository import IBus
>>> IBus.keyval_name(0x0100263a)
'U+263A'
>>>
mfabian@f39:~
$ rpm -q ibus
ibus-1.5.29-1.fc39.x86_64
mfabian@f39:~
$
mfabian@f40:~$ python3
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi import require_version
>>> require_version('IBus', '1.0')
>>> from gi.repository import IBus
>>> IBus.keyval_name(0x0100263a)
'0x100263a'
>>>
mfabian@f40:~$ rpm -q ibus
ibus-1.5.30-5.fc40.x86_64
mfabian@f40:~$
Actually not all version of ibus-1.5.30 have the new behaviour:
bash-5.2# python3
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi import require_version
>>> require_version('IBus', '1.0')
>>> from gi.repository import IBus
>>> IBus.keyval_name(0x0100263a)
'U+263A'
>>>
bash-5.2# rpm -q ibus
ibus-1.5.30-1.fc40.x86_64
bash-5.2#
I.e. on Fedora 40, ibus-1.5.30-1.fc40.x86_64
still has the old behaviour, ibus-1.5.30-5.fc40.x86_64
has the new behaviour.
This is the commit which changed it: https://github.com/fujiwarat/ibus/commit/e7329cb14de4097ca894ce19d1903a7df28acd78
/usr/include/X11/keysymdef.h contains:
For example a keyboard layout might contain something like:
so typing
AltGr+r
would produce the keysym0x0101f62d
. Currently a keybinding in ibus-typing-booster cannot be assigned to such a key.The reason is:
i.e.
IBus.keyval_name('0x0100263a')
produces the nameU+263A
butIBus.keyval_from_name('U+263A')
cannot convert that back correctly to the key value.