Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #55793 is a reply to message #55772] Mon, 14 December 2020 20:47 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1206
Registered: August 2007
Senior Contributor
Hello Mirek,

There seems to be another problem with function key handling, specifically on X11:

In X11Proc.cpp, Key release the "keysym" variable (which is unsigned long) is either uninitalized or can return values > 64K. This messes the upper word of K_ keys where the keyflags reside and basically renders the modified function keys ([SHIFT]CTRL/ALT+FN) unusable on X11.

For example, CTRL + F5:

K_CTRL_F5|K_KEYUP = 0x13ffc2
actual key        = 0xffffffc2


This seems to be a quick work-around, but unfortunately, I have little time now to investigate its possible side-effects (I believe, we don't use the upper word of keysym at this point):

CtrlCore/X11Proc.cpp:270
			keysym &= 0xFFFF; <---- ADDED
			if(keysym >= '0' && keysym <= '9' && (chr == 0 || GetCtrl() || GetAlt())) {
				DispatchKey(KEYtoK(keysym - '0' + K_0)|up, count);
				return;
			}
			if(chr >= 1 && chr < 32) {
				DispatchKey(KEYtoK(chr - 1 + K_CTRL_A)|up, count);
				return;
			}
			if(keysym >= 0xff80 && keysym <= 0xffb9 && chr) {
				DispatchKey(KEYtoK(chr)|up, count);
				return;
			}
			if(keysym >= 0xff00 && chr < 128 ||
			   (GetCtrl() || GetAlt()) && keysym >= 0x20 && keysym < 0x7f) {
				if(keysym >= 'a' && keysym <= 'z')
					keysym = keysym - 'a' + 'A';
				DispatchKey(KEYtoK(keysym|K_DELTA)|up, count);
				return;
			}





Best regards,
Oblivion


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with specific HW configuration
Next Topic: Ctrl Transparency, backpaint, ...
Goto Forum:
  


Current Time: Wed May 14 15:05:53 CEST 2025

Total time taken to generate the page: 0.00531 seconds