Page 1 of 1

Keyboard configuration on Windows

Posted: Wed Jul 01, 2009 7:55 am
by Flashheart
I know there's an article on the wiki and a couple of threads on the subject on this forum but neither seem to be especially clear or definitive. A couple of simple questions then:

Is it possible to use the Ctrl, Shift, Caps Lock or Tab keys?

The key config file looks like it's going to be read contiguously by the program rather than a line at a time - I take it splitting the keys onto different lines to make it easier to read is a no-no?

TIA from a left-hooking, south-paw, kak-handed, cargo-jettisoning newbie!

Posted: Wed Jul 01, 2009 9:00 am
by Thargoid
Which version of Oolite are you using, 1.72.2?

Tab can be used (and iirc by default is, for energy bomb).

You certainly shouldn't use shift, as some of the default keys already use it (e.g. shift-D for docking computers), so if somehow you managed to use it also for a specific function you'd end up in something of a muddle perhaps with things being triggered when you didn't want them.

It may be possible to use caps lock and ctrl if you know what their key codes are (presuming they have one), but I'd have to wonder why you want to? There are more than enough keys available (if you include shifted keys too) to cover all the current requirements.

Posted: Wed Jul 01, 2009 9:38 am
by another_commander
I don't know how exactly Mac handles this, but in the Windows / Linux versions the only key from the ones listed by Flashheart that can be used as a game key is Tab. Shift can be used in conjuction with others but does not do anything on its own.

Ctrl and Caps Lock are not considered by the keyboard handling routines, so even if you use their corresponding key codes these will not work.

Posted: Wed Jul 01, 2009 9:55 am
by Flashheart
Many thanks both. Yes I'm using 1.72.2.

The only reason I'd like to use left CTRL and the keys 'above' it is I find there's less chance of hitting a key accidentally (like that 'D' key!) if the keys are in a 'straight line'.

Will the numpad and 'block of six' above the cursor keys work? (Must admit I'm confused by the Wiki's talk of ASCII codes, I didn't realise the cursor keys had them - I'm used to using keyboard scan codes in Blitz!).

Has no-one written a simple external 'key configurator' for Oolite? It seems like a trivial task (to my simple mind :P) and would be easier/less prone to error than editing the file directly....

Posted: Wed Jul 01, 2009 11:51 am
by lfnfan
to stop myself accidentally jettisoning cargo I switched around D and Shift+D, so when I want to Dock I just press D, and when I want to Dump I press Shift+D. Someone on the boards recommended it, and it's a good 'un.

Posted: Wed Jul 01, 2009 12:00 pm
by Flashheart
Thats good tip but I'd rather get away from the ASW combination too - doesn't fit my lefthandedness and apparently chubby fingers!

Posted: Wed Jul 01, 2009 12:11 pm
by lfnfan
South-paw, I forgot. I'm a Righty myself, but I'm sure you are not alone!

Posted: Wed Jul 01, 2009 2:23 pm
by Flashheart
Just discovered this Windows dodge in answer to the third question of my original post....

To see a neatly formatted keyconfig.plist for editing, open it with MS Wordpad and save it in the \Addons directory. If you subsequently open it with notepad it'll be the same.

I can only assume the formatting/characters are due to it's creation on one of the other OS's - saving in Wordpad doesn't seem to stop it working (surprisingly!).

Posted: Wed Jul 01, 2009 2:36 pm
by Thargoid
Sorry, missed that part of your question.

Yes, wordpad is your man. On my machine I have .plist associated with it, makes life much more simple as it can deal with things like carriage returns and line feeds (and you can turn the wrapping on and off).

Posted: Thu Jul 02, 2009 3:33 pm
by Nemoricus
I personally prefer SciTE. It has a number of very useful features that make it excellent for programming, including a check for open/closed braces, brackets, and parentheses. It also has a fold feature where everything under a given brace can be minimized so that it's easier to find things.

It's also free and I recommend it.