glfw dead keys
Monkey Forums/Monkey Bug Reports/glfw dead keys
| ||
Hello, My friend has a standard Canadian keyboard layout. I believe it defaults to Quebec French standard, although there are input methods listed for both that and CMS (Canadian Multilingual Standard). The machine is apparently notebook purchased outside of Quebec. On the glfw target, neither return key is detected by mojo's KeyHit method. I've inspected input.monkey, and wrote a polling app to see if a different key would be picked up. Enter on both the main part of his keyboard and the numpad does not return any polled value (up to 65536). This shouldn't be expected behavior on any platform, but may be a limitation of the input method used in the glfw target. Upon further testing, I have discovered that there are multiple dead keys, even on US-104 standard layout keyboards. Tilde doesn't register, nor does the entire keypad on the glfw target. The keys work as expected on HTML5, including my friend's Canadian keyboard -- both return 13. There doesn't appear to be a Monkey-based workaround to this, currently. On glfw, certain keys will not return a key code no matter what. Perhaps an update to the input lib on the glfw side can fix this? |
| ||
Here is code demonstrating the bug. [monkeycode] Import mojo Function Main:Int() New Game() End Function Class Game Extends App Field LastCode:Int Method OnCreate:Int() SetUpdateRate 60 End Method Method OnRender:Int() Cls DrawText (LastCode ,0,0) 'This should work on HTML5, but won't work on glfw. US-104 layout If KeyDown(KEY_TILDE) Then DrawCircle(300,300,100) End Method Method OnUpdate:Int() For Local x:Int = 0 to 65536 If KeyHit(x) Then LastCode = x Next End Method End Class [/monkeycode] |