Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / TextInput dows not allow ! " # & / ( ) etc.
- - By MJoergen Date 2014-07-24 20:29
When I try the tutorial TextInput.rb from the examples directory, I can not enter the shifted numbers, i.e. ! " # % & / ( ) = etc. The program ignores the shift key, and instead inserts the numbers. So in other words, pressing the key combination "Shift + 1" results in the digit "1" instead of the exclamation "!" symbol.

This is completely reproducible, and I've not modified the source code in any way.

I'm running gosu-0.7.50 with ruby 2.0.0p353 on a Fedora 20 system.
Parent - - By lol_o2 Date 2014-07-25 08:41
gosu-0.7.50 with ruby 1.9.2 on Windows 7 x64 works fine for me with both shifts and right alt
Parent - By jahmaican Date 2014-07-25 10:30
Same on Win8.

Is your shift key recognized correctly by Gosu (eg. with button_down(id))? Maybe you are using an unusual keyboard layout.
Parent - - By jlnr (dev) Date 2014-07-25 23:45
If you have a chance please install libsdl2, then gem install gosu --pre. The new version uses SDL 2 as its backend, which should have much better Linux support.
Parent - By RavensKrag Date 2014-08-15 12:33
I can confirm that the "older" versions of Gosu have this problem, but the newer SDL2 builds do not.

This is one of the reasons I am most grateful for the 8.0 pre release :D

In case MJoergen (or anyone else) is curious as to why this effects only linux: this has something to do with how shift+letter used to be handled on linux. IIRC, It was basically just "take the lower case letter and make it a capital" which made generation of special characters impossible. # is not actually "capital 3" in any sense, although it is shift+3 on a QWERTY layout.

If you want to follow the discussion that was had about this, start by following this link:
https://github.com/jlnr/gosu/issues/61
(links to issue 55 where the real meat of the problem is)
Up Topic Gosu / Gosu Exchange / TextInput dows not allow ! " # & / ( ) etc.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill