Added 'Super' virtual key (win-key) and better error-log.
This commit is contained in:
@@ -42,6 +42,8 @@ Virtual_Key :: enum {
|
|||||||
Space, Enter, Escape, Tab, Backspace, CapsLock,
|
Space, Enter, Escape, Tab, Backspace, CapsLock,
|
||||||
Shift, Control, Alt,
|
Shift, Control, Alt,
|
||||||
Arrow_Up, Arrow_Down, Arrow_Left, Arrow_Right,
|
Arrow_Up, Arrow_Down, Arrow_Left, Arrow_Right,
|
||||||
|
|
||||||
|
Super,
|
||||||
}
|
}
|
||||||
Event_Keyboard :: struct {
|
Event_Keyboard :: struct {
|
||||||
virtual_key: Virtual_Key,
|
virtual_key: Virtual_Key,
|
||||||
|
|||||||
@@ -386,8 +386,10 @@ destroy_windows :: proc(window: ^Window) {
|
|||||||
case win.VK_RIGHT: return .Arrow_Right
|
case win.VK_RIGHT: return .Arrow_Right
|
||||||
case win.VK_UP: return .Arrow_Up
|
case win.VK_UP: return .Arrow_Up
|
||||||
case win.VK_DOWN: return .Arrow_Down
|
case win.VK_DOWN: return .Arrow_Down
|
||||||
|
|
||||||
|
case win.VK_LWIN, win.VK_RWIN: return .Super
|
||||||
case: {
|
case: {
|
||||||
assert(false)
|
assert(false, fmt.tprintf("Unhandled key: %v (0x%x)", vk, vk))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user