[SOLVED] Problem: Can't type apostrophes, quotes

Started by Snarky, Sat 07/02/2015 15:14:45

Previous topic - Next topic

Snarky

AGS does not recognize a number of my keyboard buttons as representing the correct character. Some keys are recognized as other characters, some not as any valid characters at all. As a result, there are a number of characters I can't type, including apostrophe ('), quote ("), backslash (), bar (|), tilde (~), backtick (`), equals (=) and plus (+). (I'm mainly testing it in the built-in save dialog, and I've confirmed that the font has these characters.)

I'm on Windows 7 with a standard US qwerty keyboard, and my Windows language and keyboard layout are set to US. I've tried changing to other keyboard mappings, and it does affect a number of the other characters (correctly, in line with the keyboard mapping), but not these.

The problem occurs in every version of the AGS engine I have tested, from whatever GRR! Bearly Sane used back in 2003 up to 3.2.1 and 3.3.3.0, both full-screen and in a window. It works fine in every other application AFAICT.

I made a test game to see how it detects the keys, outputting this string in on_key_press(eKeyCode keycode): String.Format("Keycode: %d", keycode). Here's what I get:

Apostrophe/quote: 401, no character output
Backtick/tilde: 402, no character output
Backslash/bar: 93 in US keyboard mapping, which renders a ']' (a '}' with Shift). In other mappings (DE-CH, NO, SV) it doesn't display the keycode and renders no character
equals/plus: no keycode, no character output (with a NO keyboard mapping the '=' is produced with Shift+0, which works)
left square/curly bracket: 399, no character output
right square/curly bracket: 91 in US keyboard mapping, which renders a '[' (a '{' with Shift). In NO/SV mappings 229, in DE-CH 252, no character output in either.

AGS doesn't even seem to recognize the equals/plus key at all (it doesn't trigger on_key_press).

Could be related to this issue: http://www.adventuregamestudio.co.uk/forums/index.php?issue=471.0

Gurok

Part of what you're seeing is an old escaping problem. Backslash should be fixed in 3.4.0.3. Possibly also right square bracket.

The no character output ones are a different problem (no keyboard mapping, I think).
[img]http://7d4iqnx.gif;rWRLUuw.gi

Snarky

Thanks Gurok. I tried it with 3.4.0.3, but there was no change. Backslash still becomes ], and ] becomes [.

However, I think I solved the problem. I had previously created my own keyboard layout using the Microsoft Keyboard Layout Creator, in order to type special characters the Mac way (much more elegant and easy to learn). For some reason, this layout seems to have messed with the detection of those keys, even though (1) I never redefined any of the keys that were causing problems, and (2) I wasn't even using that keyboard layout! But as I was experimenting, I uninstalled that layout, and now it's working again. I've even reinstalled it, and it still works, somehow.

Anyway, this turned out to be a my-computer-setup problem, not an AGS problem. Thanks for the help, sorry for the bother.

SMF spam blocked by CleanTalk