libera/#clim - IRC Chatlog
Search
13:29:06
calsys
jackdaniel: I don't know much about input source, but here's my little knowledge: there are 2 type of input sources, one is called keyboard layout, which will remap keys on your keyboard to others
13:30:53
calsys
in this situation, C-r will probably being translated into C-す or something. It can be seem as intended, since user have switched the layout. the extra key can probably allowed to be bind with commands
13:32:55
calsys
There are japanese (one kind), Vietnamese, Laos and some south-east asia country using this pattern, as the characters in their languages are lesser than total keys on the keyboard
13:34:08
calsys
Another type is so-called input method. It need to popup a panel on your screen and compose text inside it
13:36:34
calsys
in this situation, a Ctrl-modified character, like C-r, cannot be recognized by the input method. So it will interrupt the text composing, and being conveyed to the app as-is
13:37:58
jackdaniel
calsys: from what I've observed while using SDL2, when I press a key with a modifier and there is a character associated with the key without the modifier
13:38:13
jackdaniel
then SDL2 sends two events: text-input event (without setting there the modifier)
13:38:32
calsys
jackdaniel: as you can see in my GIF, I'm under chinese input source, then I type C-a C-e to successfully navigate
13:39:01
jackdaniel
and there is no way to tell whether they correspond to the same user action or not (that's on linux at least)
13:39:49
jackdaniel
(this is why I've concluded that SDL2 approach unusable for CLIM that processes both keys and characters)
13:40:38
calsys
in my demo, I chosenly ignore keydown events when IME is enabled: only those non-graphic characters (#\Rubout, #\Newline) are processed, others are ignored, as they've all be taken by the IME
13:41:19
calsys
it works very fine with chinese input source, probably also all CJK input sources, because they work in very similar way
13:41:28
jackdaniel
another observation, and my memory may be slightly off here, is that even when IME window is not opened, there are IME-like events sent by SDL2 for each individual character (even for us layouts)
13:44:56
cmack
I haven't been testing with SDL yet but my understanding from reading the docs was that when "Start text input" event was signaled, the other key events should be ignored.
13:45:53
calsys
my demo is for macOS, and I write a native interface using Carbon.framework to detect current active IME in real time
13:45:59
jackdaniel
cmack: but it sends it even for individual characters, when ime is not enabled; that'd mean that we can't process keys that at the same time have character bindings? (disregarding of whether we have pressed a modifier or not)
13:46:29
jackdaniel
calsys: ah, I see; and based on that flag you either handle sdl2 text input events or you ignore them? and if it is "on", then you ignore key presses?
13:46:44
calsys
cmack: no, they should not, since non-graphical characters will not be sent through textinput event
13:48:05
calsys
jackdaniel: yes, if there is an active input method, then I StartTextInput; otherwise I stop it
13:48:40
cmack
jackdaniel: that I don't know, yet... I thought that text-input and text-input-editing wouldn't be sent at all until the "start text input" command was given. that was still on my things to-check list. But I'm focused on the wayland side first :/
13:49:56
cmack
I want to get some proof-of-concept code together so it'll be easier to be concrete about differences
13:50:28
calsys
cmack: I do think you are right, the textinput event will not be sent before StartTextInput. but it will be sent after it started, whether what your current IME is
14:15:27
cmack
calsys: thanks! I see some similarities in our approaches but I may continue on my own path for wayland and then compare when I get it working. I have the IME communication but I only have the commit (sdl2 text-input equivalent) event working, not preedit
14:16:05
calsys
jackdaniel: also i wich you can checkout here when you have time: the flexi-stream cannot be passed to OPEN in LispWorks, so it will cause platform-specific error in TTF module. The patch is here, you can git am it, or do any change you want: https://paste.sr.ht/~calsys/af01c56880a4a1267ba7bf5cf60ba2e70e4354b4
14:18:23
calsys
cmack: no, i don't use mastodon. my id in all platforms are likely calsys, calsys456 or calsys3456, "The Calendrical System". my previous nickname is apr3vau, so-called April & May
14:19:29
calsys
cmack: I don't have achieved pre-edit too. Maybe we can get current these things work, then consider preedit after
14:19:51
cmack
ok, that person seems to also be macos focused with some CLIM, too. since the community is small, so far, I thought maybe it might be you too.
14:46:16
calsys
jackdaniel: please also check this patch when you have time, the default font path on macOS is not complete. The system library font folder and user library font folder is missing. patch is here: https://paste.sr.ht/~calsys/444fe74bc42cfe9a84be491d851732d2b108734f
14:56:04
jackdaniel
I'll look into it, but first I want to make fastgf work. currently, w/o fastgf, I'm slowly approaching ccl speed https://turtleware.eu/static/paste/ff4fdf04-pre-fastgf-faster.png
18:43:31
jackdaniel
cmack: re start-text-input, having in mind that I may misremember things (!), -- it was the case that each character was proposed as a separate IME sequence
18:48:42
jackdaniel
calsys: re lispworks refusing to open a stream -- we shouldn't open the stream at all