Forums » Linux
strange iup.K_CR issue
For some reason on one linux box (guild member btw) they was reporting some events not working. On closer inspection I discovered that iup.K_CR was NOT mapped to 13 but to a 63xx number. Any ideas why this would be like this?
Ed
Ed
On linux K_CR is defined as XK_Return which comes from <X11/keysym.h>.
I wonder if it's different between amd64 and x86 versions?
I wonder if it's different between amd64 and x86 versions?
No. 13 is the translated character for return, and XK_Return is the acutal keysym.
What's the actual problem?
What's the actual problem?
Actual problem = print(iup.K_CR) does *NOT* print 13 on his client.
Why is that a problem? You shouldn't care what K_CR actually is. It most definitely will be different on different platforms, so making a plugin that checks for '13' won't work on other platforms.
Somewhat related.
Some of those keys don't seem to match up. K_TAB is 265 here but 65289 is passed to keypress_cb of a canvas and similar functions. Same for the arrow keys and probably a few others.
Some of those keys don't seem to match up. K_TAB is 265 here but 65289 is passed to keypress_cb of a canvas and similar functions. Same for the arrow keys and probably a few others.
if key == iup.K_CR then
does not trigger for the enter key on the broke clients.
key capturing tells me that '13' is tripped for the enter key. iup.K_CR is not 13 and that routine never gets invoked.
I suspected there was others but Mr_spuck confirms that.
Ed
does not trigger for the enter key on the broke clients.
key capturing tells me that '13' is tripped for the enter key. iup.K_CR is not 13 and that routine never gets invoked.
I suspected there was others but Mr_spuck confirms that.
Ed
K_CR and Enter match up here. Both are 65293.
I'm on x86 with Xorg 7.3 if that matters.
I'm on x86 with Xorg 7.3 if that matters.