Control keys odd behaviour
picnic

I've just noticed that hitting either control key twice makes my kb lights flash and prevents any further reading from the keyboard until I press escape. I'm not checking the status of either control key (or any other special key) in my program.

If I insert a line to check the R control key...

if event.keyboard.keycode = ALLEGRO_KEY_RCTRL then...

...it doesn't seem to recognise it.

All other keys are working as normal. Any idea what might be the cause?

I'm using Allegro.pas, latest version of Allegro itself and Freepascal on a Linux Mint 17.2 box.

Cheers

Paul.

Chris Katko

Since you're on Linux, I would check xev and confirm that both keys show up in X11 as separate keys.

It's possible you have a keymap that is merging them together. That would at least rule out the OS as a culprit.

Then check allegro/examples/al_keyboard_events and try the same thing. Press both keys. That will show whether allegro sees those events. If it does then it's either Allegro.PAS, or possibly your program.

[edited for conciseness]

picnic

Thanks for the reply. The keys are recognised in xev as keycodes 37 and 105 but if I press either quickly in succession in the manner of a double-click I get the same blinking-lights-until-esc-pressed scenario.

Running the allegro.pas ex_keyboard_events example also shows CONTROL_L and CONTROL_R correctly but same happens if I 'double click' either.

Must be some odd hardware or OS issue I guess...

Chris Katko
picnic said:

I've just noticed that hitting either control key twice makes my kb lights flash and prevents any further reading from the keyboard until I press escape.

I don't know how I missed this... it was early when I read your post.

Does this occur when you run any other software? Because it sounds like you're hitting the keyboard into some kind of special key mode and ESC cancels it.

Is it a laptop? What kind? If not, what keyboard do you have?

picnic

I found out what the problem is .... my KVM switch <blush>

http://www.techrepublic.com/forums/discussions/problems-with-a-kvm-switch-and-the-ctrl-key/

I wasn't even aware there were any hotkeys for it, probably because there was no manual etc with it.

Thanks anyway :D

Thread #616769. Printed from Allegro.cc