Page 1 of 2

Problem with keys

Posted: Tue Apr 27, 2010 4:25 pm
by Rustybolts
Oolite 1.73.4
Ubuntu 9.10 Acer 5332 Laptop

Unable to use certain keys to play game, for example
TAB key - energy bomb have to remap sorry works
# key - wont function
/ key -wont function
haven't tested following keys but assume will have similar problems
~ @ ' : ; ? > < , . + - { } [ ] \ |
has any one else reported this or is having similar problem?
With limited amount of spare keys on keyboard this is quite annoying.

Posted: Wed Apr 28, 2010 1:45 pm
by Commander McLane
First and obvious question: Are you sure that your keyconfig.plist has these keys correctly defined?

Posted: Wed Apr 28, 2010 2:05 pm
by Diziet Sma
You can download a default keyconfig.plist here. http://www.box.net/shared/1hu9xgy4b9

Posted: Wed Apr 28, 2010 3:34 pm
by Rustybolts
Yes its an old oxp i created which has been tested on previous occasions.
If i change the event that is defined for keypress "#" to a letter say "l" it works, if i change it back again it does not respond.

Posted: Wed Apr 28, 2010 4:29 pm
by Thargoid
Second and obvious question - are you sure your keyboard (and it's driver as appropriate) are correctly configured, so the keys you are physically pressing are generating the symbols you think they are?

Posted: Wed Apr 28, 2010 5:23 pm
by Rustybolts
All keys respond in linux as they should in programs (except Oolite) Open Office Firefox etc and correspond to appropriate key pressed.

Posted: Wed Apr 28, 2010 5:29 pm
by Rustybolts
Just checked on Freedoom (Doom clone if you haven't played it) and rebinded run key to the # key and it works perfectly OK.

Posted: Wed Apr 28, 2010 6:16 pm
by Phantom Hoover
IIRC Oolite uses the American keyboard layout, so it might be that.

Posted: Wed Apr 28, 2010 6:38 pm
by Rustybolts
Phantom Hoover wrote:
IIRC Oolite uses the American keyboard layout, so it might be that.

Code: Select all

key_next_compass_mode			= "#";
When pressing the key that corresponds to # key on my keyboard on every other package it generates a # symbol so should that make a difference? :?
If it did surely other uk keyboard users would have this problem (was working ok on windows with uk keyboard)

Posted: Wed Apr 28, 2010 6:56 pm
by JensAyton
What Phantom Hoover says is correct (except under Mac OS X). "#" should correspond to shift-3 (the US keyboard location of #), regardless of logical or physical keyboard layout.

Posted: Wed Apr 28, 2010 7:27 pm
by Rustybolts
Ahruman wrote:
What Phantom Hoover says is correct (except under Mac OS X). "#" should correspond to shift-3 (the US keyboard location of #), regardless of logical or physical keyboard layout.
On my keyboard shift-3 is £ in game this works but i want to use uk # key.
When i was running windows it if i told it to use the uk # key it would use that key. :?
Image
You should really incorporate a redefine keys setup from inside of Oolite

Posted: Wed Apr 28, 2010 8:32 pm
by Phantom Hoover
Is the American layout because it was written for the Mac? It would seem a worthwhile thing to fix, given that a majority of the users are likely to be Windows users from the UK.

Posted: Wed Apr 28, 2010 8:41 pm
by Rustybolts
It was working fine on my Windows / Oolite install, I now solely use Linux and it appears to be a problem.

Posted: Wed Apr 28, 2010 9:33 pm
by JensAyton
Phantom Hoover wrote:
Is the American layout because it was written for the Mac?
No, it’s an SDL thing.

The SDL position is essentially correct: binding keys by position rather than key value is the Right Thing for games. The problem here is that key configuration involves fiddling with files in the first place. I do want to switch to a decent in-game configuration screen, but we don’t have the infrastructure in place and we need to prioritise working towards a “stable” release.

Posted: Thu Apr 29, 2010 8:43 am
by Kaks
Looking at the US layout, there is actually no key corresponding to your keyboard's "#" so I'm afraid you're momentarily out of luck there. It's entirely possible that "#" was added as a purely windows hack, so we might be able to transfer that bit of the code to linux.

However, "/" is in exactly the same position in both layouts, so I've no idea why it's not working, will try to investigate & report back...