keycodes

package module
v0.0.0-...-ac92171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2017 License: Unlicense Imports: 0 Imported by: 1

README

Cross-platform keyboard key codes for Go.

Compatible with SDL 2 scan codes and USB HID speccy (page 53)

Documentation

Index

Constants

View Source
const (
	KeyA uint16 = 4 + iota
	KeyB
	KeyC
	KeyD
	KeyE
	KeyF
	KeyG
	KeyH
	KeyI
	KeyJ
	KeyK
	KeyL
	KeyM
	KeyN
	KeyO
	KeyP
	KeyQ
	KeyR
	KeyS
	KeyT
	KeyU
	KeyV
	KeyW
	KeyX
	KeyY
	KeyZ
)
View Source
const (
	Key1 uint16 = 30 + iota
	Key2
	Key3
	Key4
	Key5
	Key6
	Key7
	Key8
	Key9
	Key0
)
View Source
const (
	// choice is to use Enter name instead of Return
	// and the key code is different from Keypad Enter
	KeyEnter uint16 = 40 + iota
	KeyEscape
	KeyBackspace
	KeyTab
	KeySpace
	// keypad minus has different key code
	KeyMinus
	KeyEquals
	KeyLeftBracket
	KeyRightBracket
	KeyBackslash
)
View Source
const (
	// different name from SDL2 for brevity
	KeyColon uint16 = 51 + iota
	KeyApostrophe
	// KeyTilde is an alias
	KeyGrave
	KeyCommad
	// KeyDot is an alias, keypad period is a different
	KeyPeriod
	Slash
	CapsLock
)
View Source
const (
	KeyF1 uint16 = 58 + iota
	KeyF2
	KeyF3
	KeyF4
	KeyF5
	KeyF6
	KeyF7
	KeyF8
	KeyF9
	KeyF10
	KeyF11
	KeyF12
)
View Source
const (
	KeyPrintScreen uint16 = 70 + iota
	KeyScrollLock
	KeyPause
	KeyInsert
	KeyHome
	KeyPageUp
	KeyDelete
	KeyEnd
	KeyPageDown
	KeyRight
	KeyLeft
	KeyDown
	KeyUp
)
View Source
const (
	KeyNumLock uint16 = 83 + iota
	KeyKpDivide
	KeyKpMultiply
	KeyKpMinus
	KeyKpPlus
	KeyKpEnter
	KeyKp1
	KeyKp2
	KeyKp3
	KeyKp4
	KeyKp5
	KeyKp6
	KeyKp7
	KeyKp8
	KeyKp9
	KeyKp0
	// KeyKpDot is an alias
	KeyKpPeriod
)
View Source
const (
	KeyLCtrl uint16 = 224 + iota
	KeyLShift
	KeyLAlt
	// KeyLWin is an alias
	KeyLGUI
	KeyRCtrl
	KeyRShift
	KeyRAlt
	// KeyRWin is an alias
	KeyRGUI
)
View Source
const KeyDot = KeyPeriod
View Source
const KeyKpDot = KeyKpPeriod
View Source
const KeyLWin = KeyLGUI
View Source
const KeyRWin = KeyRGUI
View Source
const KeyTilde = KeyGrave

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL