Home » U++ Library support » U++ Widgets - General questions or Mixed problems » K_CTRL_SEMICOLON and K_CTRL_PERIOD keys share the same constant value on Win32
Re: K_CTRL_SEMICOLON and K_CTRL_PERIOD keys share the same constant value on Win32 [message #55833 is a reply to message #55831] |
Fri, 18 December 2020 18:12   |
Oblivion
Messages: 1206 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
I've attached the patch.
After further investigating, the problem turned out to be simpler to solve. The culprit seems to be decode().
When keysym is returned as default, it is truncated and the higher bytes were invalidated (filled with 0xff).
Changing this:
keysym = decode((int)event->xkey.keycode, 0xa, '1', 0xb, '2', 0xc, '3', 0xd, '4',
0xe, '5', 0xf, '6', 0x10, '7', 0x11, '8', 0x12, '9', 0x13, '0',
keysym);
to this, solved the problem:
keysym = decode((int)event->xkey.keycode,
0x0a, 0x31,
0x0b, 0x32,
0x0c, 0x33,
0x0d, 0x34,
0x0e, 0x35,
0x0f, 0x36,
0x10, 0x37,
0x11, 0x38,
0x12, 0x39,
0x13, 0x30, keysym);
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Fri, 18 December 2020 19:09] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 14 10:59:17 CEST 2025
Total time taken to generate the page: 0.00615 seconds
|