Another possibly helpful tip: the classic Unix VM installs a man page. I am attaching a PDF of it here.

The -encoding command line option is explained, and might be relevant here (I'm not sure).

Dave


On 2024-05-04 18:37, Christoph Thiede via Squeak-dev wrote:


Thank you for the pointer!

When I run xev -event keyboard and type ^ and then a, this is what I get:

KeyPress event, serial 28, synthetic NO, window 0x4400001,
    root 0x50f, subw 0x0, time 179242899, (1044,435), root:(1094,554),
    state 0x10, keycode 49 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 28, synthetic NO, window 0x4400001,
    root 0x50f, subw 0x0, time 179243010, (1044,435), root:(1094,554),
    state 0x10, keycode 49 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4400001,
    root 0x50f, subw 0x0, time 179246355, (1044,435), root:(1094,554),
    state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XmbLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: True

KeyPress event, serial 28, synthetic NO, window 0x4400001,
    root 0x50f, subw 0x0, time 179246355, (1044,435), root:(1094,554),
    state 0x10, keycode 0 (keysym 0xe2, acircumflex), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 a2) "â"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4400001,
    root 0x50f, subw 0x0, time 179246450, (1044,435), root:(1094,554),
    state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

Notably, the first two events appear immediately, that is before I press the second key. In contrast, in Squeak no event will be received from EventSensor before I press the second key.

It also seems as if the XFilterEvent information is relevant to discover characters that should not be printed into an editor directly but only used for manual character combination or the "dead key preview" feature that I referenced above. We do not have an equivalent concept to that in Squeak.

As a vague theory, the VM might be too clever and try to split up combined characters again. Or it mixes up the order of some things. I will have a look into the sources on another day. If someone can point me to a dead key-aware reference implementation, this still would be helpful. :-)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <squeak-smalltalk/squeak-object-memory/issues/120/2094341947@github.com>