Unmapped Keys: MapWxKeyCodeToBlitz
BlitzMax Forums/Brucey's Modules/Unmapped Keys: MapWxKeyCodeToBlitz
| ||
Hi Brucey, I'm getting an unmapped key message for: KEY_MINUS and KEY_EQUALS. Am I meant to be using different names? Thanks |
| ||
I've added mappings for WXK_ADD and WXK_SUBTRACT. Let me know if that sorts it :-) |
| ||
Hi Brucey - I just updated and rebuilt (Ctrl +D etc). I can see your code addition at the bottom of the select list - which looks right to me. But I'm still getting the messages:DebugLog:Unmapped key : 45 DebugLog:Unmapped key : 43 I'm using this code Function _OnKeyDown(_event:wxEvent) Local evt:wxKeyEvent = wxKeyEvent(_event) EmitEvent(CreateEvent( EVENT_KEYDOWN, _event.parent, MapWxKeyCodeToBlitz(evt.GetKeyCode()))) _event.Skip() TAppointmentGroup(_event.parent).NotifyObservers() End Function And I'm pressing the - and = keys. Their shift counterparts are _ and + and they sit on the main keyboard. XP. :-) |
| ||
This isn't a big or urgent issue - but I've put together a little test demo. Build in debug mode and watch for any output on key press. I get unhandled keys for , . / ; ' - = ` on XP Can others confirm? SuperStrict Framework wx.wxApp Import wx.wxFrame Import brl.standardIO Type MyApp Extends wxApp Field Window:wxFrame Method OnInit:Int() Window = New wxFrame.Create(, , "Press the - and = keys",60,60,260,60) ConnectAny(wxEVT_KEY_DOWN, _OnKeyDown) Window.Show() Return True End Method Function _OnKeyDown(_event:wxEvent) Local evt:wxKeyEvent = wxKeyEvent(_event) Print "key (" + evt.GetUnicodeKey() + ") = " + evt.GetKeyCode() EmitEvent(CreateEvent( EVENT_KEYDOWN, _event.parent, MapWxKeyCodeToBlitz(evt.GetKeyCode()))) _event.Skip() End Function End Type New MyApp.run() |
| ||
confirmed also enter on the numeric keypad |
| ||
Hi Glenn! Does your Win32 show garbage for the "GetUnicodeKey()" method too? |
| ||
Yeah confirmed. Brucey, the GetUnicodeKey() method gives garbage for all the unhandled keys here, but works fine with the keys which worked fine using GetKeyCode(). |
| ||
What Kenshin said. |
| ||
Thanks for testing guys. |
| ||
I've just committed an update which should hopefully catch most of the key mappings now. Keys known not to map are F13 - F19. If anyone finds any that don't work for them, can you post it here please? (the key you pressed, and the code that didn't map). Thanks! I haven't sorted out the unicode key value yet. |