- struct sWndMsg_Bool _msg;
-
- if( gpWM_FocusedWindow == Destination )
- return ;
-
- _msg.Val = 0;
- WM_SendMessage(NULL, gpWM_FocusedWindow, WNDMSG_FOCUS, sizeof(_msg), &_msg);
- _msg.Val = 1;
- WM_SendMessage(NULL, Destination, WNDMSG_FOCUS, sizeof(_msg), &_msg);
-
- gpWM_FocusedWindow = Destination;
+ struct sWndMsg_KeyAction msg;
+
+ WM_Hotkey_KeyDown(Scancode);
+
+ msg.KeySym = Scancode;
+ msg.UCS32 = Character;
+ WM_SendMessage(NULL, gpWM_FocusedWindow, WNDMSG_KEYDOWN, sizeof(msg), &msg);
+}
+
+void WM_Input_KeyFire(uint32_t Character, uint32_t Scancode)
+{
+ struct sWndMsg_KeyAction msg;
+
+ // TODO: Properly translate into KeySyms and Unicode
+
+ msg.KeySym = Scancode;
+ msg.UCS32 = Character;
+ WM_SendMessage(NULL, gpWM_FocusedWindow, WNDMSG_KEYFIRE, sizeof(msg), &msg);
+}
+
+void WM_Input_KeyUp(uint32_t Character, uint32_t Scancode)
+{
+ struct sWndMsg_KeyAction msg;
+
+ WM_Hotkey_KeyUp(Scancode);
+
+ msg.KeySym = Scancode;
+ msg.UCS32 = Character;
+ WM_SendMessage(NULL, gpWM_FocusedWindow, WNDMSG_KEYUP, sizeof(msg), &msg);