Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Key scancode list requested

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Key scancode list requested

Post 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?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Key scancode list requested

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
bulrush
Competent
Competent
Posts: 55
Joined: Mon Apr 14, 2008 1:44 pm

Post 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).
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
Post Reply