Tremulous Forum
General => Troubleshooting => Topic started by: Josellis on August 08, 2007, 01:53:26 pm
-
Unfortunatly, not everyone has the standard US keyboard. Even more unfortunate is that Tremulous believes that it is a standard US keyboard connected to the computer, even if it is a French one, Norwegian, Portuguese, or anything else. There is a large group f computers which (for example) have the Z and Y swapped (and therefore have the Y after the T and the Z before the X), and I happen to have one of those keyboards.
When I play, if I press my "Z" key (which is the the place of the "Y" key), I can start teamchatting, however, in my autogen.cfg and autoexec.cfg the Y key is bound to teamchat, thus proving that the game thinks I'm inputing on a US keyboard and therefore believe it's a Y. Although it isn't a big problem with just the Z-Y swap, it gets much more complicated when you look at the punctuations and special characters. Strangely, in the console and when I am typing in the chat, the game wil recognise my keyboard and if I press Z, it recognises it as a Z.
In addition to those problems, if I want to edit my autoexec.cfg file, WordPad knows I have Swiss keyboard, and therefore when I press my Z key, it will actually insert a Z, but in the game, it will believe it's a Y which are in very different places on the keyboard and can be very frustrating when editing things manually.
I was wondering if there is a way to change the ingame keyboard layout settings to Swiss or whatever keyboard layout you have instead of US, and if this isn't possible, how can I avoid this problem?
PS: A list of different keyboard layouts can be found here (http://en.wikipedia.org/wiki/Keyboard_layout)
-
Originally, Quake 3 shipped to multiple countries and each one had a different default keyboard layout to fit non-US keyboards.
Tremulous is not even a commercial game. Keep that in mind.
-
ehmm, I know of another game which is in pre-alpha stage, and there are no problems with the different keyboard layout. Tremulous is at version 1.1.0 and it can't even support different keyboard layouts. Anyway, I didn't ask if Tremulous is a commercial game, and I know it is not a commercial game, however this does not mean that the game has to be crap or that it cannot contain some features.
I asked if it is possible to change what keyboard layout Tremulous think I have to what I actually have, and if this isn't possible, is there a way to avoid this problem?
-
Quake 3 on Linux is keymap dependent (and I'd kill to make Enemy Territory keymap independent :roll:).
In addition to those problems, if I want to edit my autoexec.cfg file, WordPad knows I have Swiss keyboard...
Please don't use that piece of crap. PSPad is way better, even for a VI user like me.
Funny note: Czech pronunciation of "wordpad" is similar to pronunciation of "odpad", which means garbage in Czech. I think it's too accurate description to be just a coincidence :D
-
lol, btw, wordpad works just fine for what I want. Anyway, you say Quake 3 is keymap dependent, but can't you change what keymap it depends on?
-
lol, btw, wordpad works just fine for what I want. Anyway, you say Quake 3 is keymap dependent, but can't you change what keymap it depends on?
It's keymap dependent on Linux. Windows version reads system scancodes directly instead.
-
Windows version reads system scancodes directly instead.
hmmm, I'm not a programmer and I don't go much into the technical side of things unless I have to, and what you just said doesn't make any sense for me.
-
Basically you should change the key maps to be suitable for your keyboard and layout. If you had a keyboard that has the WASD keys scattered and the QPMZ keys in place, and you are already used to typing on that keyboard, then you would have binding like /bind Q +forward;bind P +back; and so on.
Or if you absolutely want to stick with the default for some reason, you may switch to the US keyboard layout (in your operating system). It's keymap dependent on Linux. Windows version reads system scancodes directly instead.
I don't know what that means, lol, but if you meant that changing they keyboard layout in Windows does not alter the keys for a specific action, then you are wrong.
Note: only noobs use the default keyboard settings.
-
I don't know what that means, lol, but if you meant that changing they keyboard layout in Windows does not alter the keys for a specific action, then you are wrong.
Orly? What's s_scantokey and MapKey() in src/win32/win_wndproc.c for then? :roll:
-
I don't know what that means, lol, but if you meant that changing they keyboard layout in Windows does not alter the keys for a specific action, then you are wrong.
Orly? What's s_scantokey and MapKey() in src/win32/win_wndproc.c for then? :roll:
For show.
Actually, looking into it reveals that MapKey() converts from ASCII to keyNum_t (so that you can't press 0x01 for example, to avoid bugs).
MapKey() gets its key parameter from MainWndProc's lParam parameter. MainWndProc is called by the OS. I don't know about your Windows XP [lol edition?], but on my Windows XP, changing the key layout causes the lParam to be changed accordingly.
-
For show.
Actually, looking into it reveals that MapKey() converts from ASCII to keyNum_t (so that you can't press 0x01 for example, to avoid bugs).
MapKey() gets its key parameter from MainWndProc's lParam parameter. MainWndProc is called by the OS. I don't know about your Windows XP [lol edition?], but on my Windows XP, changing the key layout causes the lParam to be changed accordingly.
If you were right, s_scantokey would copy ASCII table, not QWERTY keyboard layout. wParam is the keycode from system keymap, lParam contains low-level system scancode and other info about they key pressed. And BTW, I don't use Windows.
http://msdn2.microsoft.com/en-us/library/ms646280.aspx
WM_KEYDOWN Notification
Parameters
wParam
Specifies the virtual-key code of the nonsystem key.
lParam
Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table.
0-15
Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
16-23
Specifies the scan code. The value depends on the OEM.
24
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
25-28
Reserved; do not use.
29
Specifies the context code. The value is always 0 for a WM_KEYDOWN message.
30
Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up.
31
Specifies the transition state. The value is always zero for a WM_KEYDOWN message.
-
Sorry, but I just got totally confused
As I said previously, I am not into all the programming and stuff.
Now, the problem is not in the fact that default keyboard setting are just scattered around the keyboard (like having WASD shuffled), but that the game isn't actually recognising my keystrokes as what they should be, for example, if I press Z on my keyboard, the game believes it is a Y and starts teamchatting, but when you go into punctuation, it becomes much harder to deshuffle everything, and in addition, they are some keys where are on the Swiss keyboard which aren't on the US keyboard.
All I want are instructions on how to change the keyboard settings, and what are those scancodes everyone keeps talking about?
And sorry for the inconveniences
-
All I want are instructions on how to change the keyboard settings,
The lazy way: File a bug report to ioQ3 bugzilla and pray somebody will get bored enough to fix it.
The hard way: Download Tremulous source codes, open src/win32/win_wndproc.c, go to line 120 and change the letters in the table to copy your native keyboard layout. Then compile your own tremulous.exe and play with that one.
and what are those scancodes everyone keeps talking about?
Scancode is a number that describes a key on your keyboard. When you press a key, Windows read the corresponding number, use it as an index into keymap table and find out what should that key do.
-
Should have double checked before writing anything too smart. It DOES depend on the OEM. :) I checked, only the character typing (console, chat, ...) changed. Maybe I was playing on Linux when changing the layouts changed the game key layouts too (I just don't remember). Well, character input is different from dinput.
And Josellis, don't mind us, it's an advanced topic. I think this is what you're looking for: write these command in the console: /bind z "messagemode2"
/unbind y
To swap x and y.
-
Thank you :)
I have gone for the compiler option, and for me it seems very easy (not much coding involved :)
Anyway, now I have another question, are the following keys bindable in Trem? and if so, what would be their name? (like ; isn't just ";" it is "SEMICOLON"
§ ' ^ CAPS_LOCK è ¨ é à $ < Alt_Gr
-
Thank you :)
I have gone for the compiler option, and for me it seems very easy (not much coding involved :)
Anyway, now I have another question, are the following keys bindable in Trem? and if so, what would be their name? (like ; isn't just ";" it is "SEMICOLON"
§ ' ^ CAPS_LOCK è ¨ é à $ < Alt_Gr
Semicolon is a special case because it's used as a command separator in config files. It's not treated as a special key in the code.
Those keys should already be mapped to some virtual keycodes so just backup your config file and bind those keys to something in the in-game options menu.
-
i believe that accented character cause a crash in the 1.1 client (fixing it isn't easy because the svn client no longer works with 1.1, but it is already fixed for 1.2)