Re: [AD] X11 keyboard driver missing key up events

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2011-03-03 at 13:33 +0100, Elias Pschernig wrote:
> That looks like every single program will see a Home key press there
> then - there's no way to work around that. My guess is holding the
> space key down makes the keyboard or the kernel or something think
> that some special key is pressed which makes the Right key appear as
> home. I think my netbook has a key like that... it does nothing on its
> own but pressing it together with other keys changes them. Not sure
> how the space key can trigger that, but the problem might be in the
> X11 input driver. Maybe need a special driver for this keyboard.

Ya, this keyboard has a Fn key that changes the behaviour of some keys.
Space left/right does not behave this way in Windows or OS X though.
Anyhow, the easiest way to work around it is in my game where I added:

	else if (keycode == ALLEGRO_KEY_HOME) {
		if (onoff) {
			right = false;
			left = true;
		}
		else {
			left = false;
		}
	}
	else if (keycode == ALLEGRO_KEY_END) {
		if (onoff) {
			left = false;
			right = true;
		}
		else {
			right = false;
		}
	}

I can't use the HOME/END keys now for anything, but I didn't anyway.. I
guess this is a sufficient workaround.

Trent





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/