Forums » Linux

strange iup.K_CR issue

Feb 03, 2008 blacknet link
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
Feb 03, 2008 raybondo link
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?
Feb 08, 2008 a1k0n link
No. 13 is the translated character for return, and XK_Return is the acutal keysym.

What's the actual problem?
Feb 10, 2008 blacknet link
Actual problem = print(iup.K_CR) does *NOT* print 13 on his client.
Feb 13, 2008 raybondo link
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.
Feb 15, 2008 mr_spuck link
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.
Feb 15, 2008 blacknet link
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
Feb 15, 2008 mr_spuck link
K_CR and Enter match up here. Both are 65293.

I'm on x86 with Xorg 7.3 if that matters.