justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: SWELL/GDK: Is there a reliable way to process VK_OEM_X keys? Currently I just use the plain characters and works but have difficulty to process the period character...
Asked by Gio (79.130.25.x) on April 9 2021, 9:04pm
Reply on April 10 2021, 12:05pm:
    #ifdefs I guess? Do you mean the period character on the main keyboard or on the numpad?


Comments:
  • Posted by Gio (79.130.25.x) on April 10 2021, 9:03pm:
    I use #ifdefs for VK_OEMS_X keys. All keys are processed except for the period/greater-than (main keyboard), not VK_DECIMAL (works). :/

  • Posted by Justin on April 11 2021, 12:22am:
    Hmm what keyboard layout? Haven't noticed an issue here hmmm....

  • Posted by Gio (79.130.25.x) on April 11 2021, 1:57am:
    Using some very old lenovo (X61, S10-2) but it happens in VM as well in my standard machine, only keyboards I use are 104 ANSI US, language US. I'm afraid it has nothing to do with keyboard layout, could you point me where to look in SWELL codebase to experiment myself? It's very weird...

  • Posted by Justin on April 11 2021, 2:09am:
    a good place to start is swell-generic-gdk.cpp and see what swell_gdkConvertKey() ends up getting sent. What linux distribution and version? gdk2 or gdk3?

  • Posted by Gio (79.130.25.x) on April 11 2021, 3:27am:
    Development is done using the latest Debian stable (Debian 10), releases Debian 7 -- GDK3. It happens to both, greater-than character (which is essentially the same key, works) it's just the period that is not working - my implementation also seems to work, I mean if replace period with something else it works as expected. Anyway, I'll have a deeper look and if I find something I will post here. Thanks!

  • Posted by Gio (79.130.25.x) on April 11 2021, 9:49am:
    The OnKeyEvent() flow works as expected with period key; it treats it as ASCII. SWELLAPP_PROCESSMESSAGE is sent and message loop receives it correctly. It looks like that VK_DELETE is interpreted as period and messes my keyboard map. Still unsure if I have to workaround the issue on the application level or just make a patch for VK_OEMS_X.

  • Posted by Justin on April 11 2021, 9:24pm:
    Ah to distinguish between period and VK_DELETE, check if lParam has FVIRTKEY set (it will be set for VK_DELETE, clear for period)

  • Posted by Gio (79.130.25.x) on April 11 2021, 11:36pm:
    Justin, thank you for the valuable help!


Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS