krampus19/gut/keys.go

290 lines
5.3 KiB
Go
Raw Normal View History

package gut
import "opslag.de/schobers/allg5"
func KeyToString(k allg5.Key) string {
switch k {
case allg5.KeyA:
return "A"
case allg5.KeyB:
return "B"
case allg5.KeyC:
return "C"
case allg5.KeyD:
return "D"
case allg5.KeyE:
return "E"
case allg5.KeyF:
return "F"
case allg5.KeyG:
return "G"
case allg5.KeyH:
return "H"
case allg5.KeyI:
return "I"
case allg5.KeyJ:
return "J"
case allg5.KeyK:
return "K"
case allg5.KeyL:
return "L"
case allg5.KeyM:
return "M"
case allg5.KeyN:
return "N"
case allg5.KeyO:
return "O"
case allg5.KeyP:
return "P"
case allg5.KeyQ:
return "Q"
case allg5.KeyR:
return "R"
case allg5.KeyS:
return "S"
case allg5.KeyT:
return "T"
case allg5.KeyU:
return "U"
case allg5.KeyV:
return "V"
case allg5.KeyW:
return "W"
case allg5.KeyX:
return "X"
case allg5.KeyY:
return "Y"
case allg5.KeyZ:
return "Z"
case allg5.Key0:
return "0"
case allg5.Key1:
return "1"
case allg5.Key2:
return "2"
case allg5.Key3:
return "3"
case allg5.Key4:
return "4"
case allg5.Key5:
return "5"
case allg5.Key6:
return "6"
case allg5.Key7:
return "7"
case allg5.Key8:
return "8"
case allg5.Key9:
return "9"
case allg5.KeyPad0:
return "Pad 0"
case allg5.KeyPad1:
return "Pad 1"
case allg5.KeyPad2:
return "Pad 2"
case allg5.KeyPad3:
return "Pad 3"
case allg5.KeyPad4:
return "Pad 4"
case allg5.KeyPad5:
return "Pad 5"
case allg5.KeyPad6:
return "Pad 6"
case allg5.KeyPad7:
return "Pad 7"
case allg5.KeyPad8:
return "Pad 8"
case allg5.KeyPad9:
return "Pad 9"
case allg5.KeyF1:
return "F1"
case allg5.KeyF2:
return "F2"
case allg5.KeyF3:
return "F3"
case allg5.KeyF4:
return "F4"
case allg5.KeyF5:
return "F5"
case allg5.KeyF6:
return "F6"
case allg5.KeyF7:
return "F7"
case allg5.KeyF8:
return "F8"
case allg5.KeyF9:
return "F9"
case allg5.KeyF10:
return "F10"
case allg5.KeyF11:
return "F11"
case allg5.KeyF12:
return "F12"
case allg5.KeyEscape:
return "Escape"
case allg5.KeyTilde:
return "~"
case allg5.KeyMinus:
return "-"
case allg5.KeyEquals:
return "Equals"
case allg5.KeyBackspace:
return "Backspace"
case allg5.KeyTab:
return "Tab"
case allg5.KeyOpenBrace:
return "("
case allg5.KeyCloseBrace:
return ")"
case allg5.KeyEnter:
return "Enter"
case allg5.KeySemicolon:
return ";"
case allg5.KeyQuote:
return "'"
case allg5.KeyBackslash:
return "\\"
case allg5.KeyBackslash2:
return "\\"
case allg5.KeyComma:
return ","
case allg5.KeyFullstop:
return "."
case allg5.KeySlash:
return "/"
case allg5.KeySpace:
return "Space"
case allg5.KeyInsert:
return "Insert"
case allg5.KeyDelete:
return "Delete"
case allg5.KeyHome:
return "Home"
case allg5.KeyEnd:
return "End"
case allg5.KeyPageUp:
return "Page Up"
case allg5.KeyPageDown:
return "Page Down"
case allg5.KeyLeft:
return "Left"
case allg5.KeyRight:
return "Right"
case allg5.KeyUp:
return "Up"
case allg5.KeyDown:
return "Down"
case allg5.KeyPadSlash:
return "Slash"
case allg5.KeyPadAsterisk:
return "Asterisk"
case allg5.KeyPadMinus:
return "-"
case allg5.KeyPadPlus:
return "+"
case allg5.KeyPadDelete:
return "Delete"
case allg5.KeyPadEnter:
return "Enter"
case allg5.KeyPrintScreen:
return "Print Screen"
case allg5.KeyPause:
return "Pause"
case allg5.KeyAbntC1:
return "AbntC1"
case allg5.KeyYen:
return "Yen"
case allg5.KeyKana:
return "Kana"
case allg5.KeyConvert:
return "Convert"
case allg5.KeyNoConvert:
return "NoConvert"
case allg5.KeyAt:
return "@"
case allg5.KeyCircumflex:
return "^"
case allg5.KeyColon2:
return ":"
case allg5.KeyKanji:
return "Kanji"
case allg5.KeyPadEquals:
return "="
case allg5.KeyBackQuote:
return "`"
case allg5.KeySemicolon2:
return ";"
case allg5.KeyCommand:
return "Command"
case allg5.KeyBack:
return "Back"
case allg5.KeyVolumeUp:
return "Volume Up"
case allg5.KeyVolumeDown:
return "Volume Down"
case allg5.KeySearch:
return "Search"
case allg5.KeyDPadCenter:
return "D-pad Center"
case allg5.KeyButtonX:
return "Button X"
case allg5.KeyButtonY:
return "Button Y"
case allg5.KeyDPadUp:
return "D-pad Up"
case allg5.KeyDPadDown:
return "D-pad Down"
case allg5.KeyDPadLeft:
return "D-pad Left"
case allg5.KeyDPadRight:
return "D-pad Right"
case allg5.KeySelect:
return "Select"
case allg5.KeyStart:
return "Start"
case allg5.KeyButtonL1:
return "Button Left 1"
case allg5.KeyButtonR1:
return "Button Right 1"
case allg5.KeyButtonL2:
return "Button Left 2"
case allg5.KeyButtonR2:
return "Button Right 2"
case allg5.KeyButtonA:
return "Button A"
case allg5.KeyButtonB:
return "Button B"
case allg5.KeyThumbL:
return "Thumb Left"
case allg5.KeyThumbR:
return "Thumb Right"
case allg5.KeyUnknown:
return "Unknown"
case allg5.KeyLShift:
return "Left Shift"
case allg5.KeyRShift:
return "Right Shift"
case allg5.KeyLCtrl:
return "Left Control"
case allg5.KeyRCtrl:
return "Right Control"
case allg5.KeyAlt:
return "Alt"
case allg5.KeyAltGr:
return "AltGr"
case allg5.KeyLWin:
return "Left Windows"
case allg5.KeyRWin:
return "Right Windows"
case allg5.KeyMenu:
return "Menu"
case allg5.KeyScrollLock:
return "ScrollLock"
case allg5.KeyNumLock:
return "Numlock"
case allg5.KeyCapsLock:
return "Capslock"
}
return "Unknown"
}