+ case WNDMSG_KEYDOWN: {
+ const struct sWndMsg_KeyAction *msg = Data;
+ if(Len < sizeof(*msg)) return -1;
+
+ if(!info->FocusedElement) return 0;
+ ele = info->FocusedElement;
+
+ if(gaWM_WidgetTypes[ele->Type]->KeyDown)
+ gaWM_WidgetTypes[ele->Type]->KeyDown(ele, msg->KeySym, msg->UCS32);
+ else
+ {
+ // TODO: Pass to user
+ }
+
+ return 0; }
+
+ case WNDMSG_KEYFIRE: {
+ const struct sWndMsg_KeyAction *msg = Data;
+ if(Len < sizeof(*msg)) return -1;
+
+ if(!info->FocusedElement) return 0;
+ ele = info->FocusedElement;
+
+ if(gaWM_WidgetTypes[ele->Type]->KeyFire)
+ gaWM_WidgetTypes[ele->Type]->KeyFire(ele, msg->KeySym, msg->UCS32);
+ else
+ {
+ // TODO: Pass the buck
+ }
+ return 0; }
+
+ case WNDMSG_KEYUP: {
+ const struct sWndMsg_KeyAction *msg = Data;
+ if(Len < sizeof(*msg)) return -1;
+
+ if(!info->FocusedElement) return 0;
+ ele = info->FocusedElement;
+
+ if(gaWM_WidgetTypes[ele->Type]->KeyUp)
+ gaWM_WidgetTypes[ele->Type]->KeyUp(ele, msg->KeySym);
+ else
+ {
+ // TODO: Pass the buck
+ }
+ return 0; }
+