Page 1 of 1

Key scancode list requested

Posted: Mon Apr 21, 2008 1:45 pm
by bulrush
I have Oolite 1.65 Windows/PC.

I would like a program or table which shows the key scancodes. For example, I would like to change my jump key from "j" to "pagedown" so I don't have to move my fingers off the cursor keys to jump.

Does such a beast exist for Windows?

Re: Key scancode list requested

Posted: Mon Apr 21, 2008 2:33 pm
by Eric Walch
bulrush wrote:
I have Oolite 1.65 Windows/PC.

I would like a program or table which shows the key scancodes. For example, I would like to change my jump key from "j" to "pagedown" so I don't have to move my fingers off the cursor keys to jump.

Does such a beast exist for Windows?
It should be in the file "keyconfig.plist" that was placed in a folder "config" in your addOns folder. At least it is o a mac, but I assume also on Windows.

Posted: Mon Apr 21, 2008 2:36 pm
by another_commander
On Oolite for Windows v1.65, the keyconfig.plist is located in the folder
[Oolite_Install_Dir]\oolite.app\Contents\Resources\Config, while in the later versions it lives in [Oolite_Install_Dir]\oolite.app\Resources\Config.

Posted: Mon Apr 21, 2008 3:23 pm
by bulrush
I'm not looking for the file, thanks. I'm looking for the scan codes. keyconfig does not use pgdn by default, so it is currently not in there, IIRC.

Posted: Mon Apr 21, 2008 3:31 pm
by another_commander
As far as I am aware, PageDn is not included in the list of keys recognized by Oolite. At least not for the Windows version.

Posted: Mon Apr 21, 2008 4:46 pm
by bulrush
Every key on a keyboard has a scancode. This scancode is generated by the hardware and is readable by the software. Isn't Ahruman the author for the Mac version? I thought he was using some type of C for the compiler. If so, that should easily get any scancode for any key on the keyboard. Now whether we (the users) have the value for that scancode is another matter.

I've written programs in DOS to do this (years ago), but have not had a reason to do it in Windows.

Posted: Mon Apr 21, 2008 5:12 pm
by another_commander
Yes, every key has a scancode and yes, we can easily get any scancode for any key on the keyboard. However, Oolite on Windows ignores PageUp, PageDn and a few other keys, so even if you know the scancodes, it won't respond to them.

Anyway, if you must give it a try, scancode for PageUp is 280 and for PageDn is 281.

Posted: Mon Apr 21, 2008 7:30 pm
by bulrush
Ah! That clears it up. Why does it ignore PGUP and PGDN? It seems to use HOME ok (can't remember for what).

Posted: Tue Apr 22, 2008 6:01 am
by another_commander
No particular reason, I imagine. It's just that these two keys were never really required to do anything. Home was selected to be the key for homing the cursor on the chart screens and that is why it responds to key presses. Key reassignments work best with the alphanumeric keys, really.