X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Fwm_input.c;h=dc8d8acbe3c056937ad74c8ac3612c8cac9092a7;hb=94478ae8163d1ce92ed54550f03e76bb9f2e1802;hp=f15d25a7ec1768d29d1ae9dcd06afffd32d7a561;hpb=ec0a3c65da8c3d47895ab2e5b4cec8cf2070f6eb;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/wm_input.c b/Usermode/Applications/axwin3_src/WM/wm_input.c index f15d25a7..dc8d8acb 100644 --- a/Usermode/Applications/axwin3_src/WM/wm_input.c +++ b/Usermode/Applications/axwin3_src/WM/wm_input.c @@ -13,6 +13,7 @@ // === IMPORTS === extern tWindow *gpWM_RootWindow; +extern tWindow *gpWM_FocusedWindow; // === GLOBALS === //! Window in which the mouse button was originally pressed @@ -110,3 +111,27 @@ void WM_Input_MouseButton(int X, int Y, int ButtonIndex, int Pressed) WM_Input_int_SendBtnMsg(win, X, Y, ButtonIndex, Pressed); } +void WM_Input_KeyDown(uint32_t Character, uint32_t Scancode) +{ + struct sWndMsg_KeyAction msg; + 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; + 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; + msg.KeySym = Scancode; + msg.UCS32 = Character; + WM_SendMessage(NULL, gpWM_FocusedWindow, WNDMSG_KEYUP, sizeof(msg), &msg); +} +