keyboard

package
Version: v0.0.0-...-7296e18 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

The keyboard Pacakge handles the keyboard events on the gl context To capture events as they happen you can use the callbacks OnKeyDown, OnKeyUp, OnTextInput, and OnTextEdit. Define them by calling keyboard.OnKeyDown = [callback]

Index

Constants

This section is empty.

Variables

View Source
var (
	// OnKeyDown is called when a key on the keyboard is pressed down.
	OnKeyDown func(key Key, is_repeat bool)
	// OnKeyUp is called when a key on the keyboard is released.
	OnKeyUp func(key Key)
	// OnTextInput is called when text has been entered by the user. For example if
	// shift-2 is pressed on an American keyboard layout, the text "@" will be generated.
	OnTextInput func(str string)
	// OnTextEdit is called when the candidate text for an IME (Input Method Editor) has changed.
	OnTextEdit func(str string, start, length int32)
)

Functions

func Delegate

func Delegate(event sdl.Event)

Delegate is used by amore/event to pass events to the keyboard package. It may also be useful to stub or fake events

func HasKeyRepeat

func HasKeyRepeat() bool

HasKeyRepeat gets whether key repeat is enabled.

func HasTextInput

func HasTextInput() bool

HasTextInput gets whether text input events are enabled. For example if enabled, and shift-2 is pressed on an American keyboard layout, the text "@" will be generated. If disabled just a 2 will be sent to the keypress/keyrelease callbacks

func IsDown

func IsDown(key Key) bool

IsDown checks whether a certain key is down.

func IsScancodeDown

func IsScancodeDown(scancode Scancode) bool

IsScancodeDown checks whether a certain scancode is down.

func SetKeyRepeat

func SetKeyRepeat(enabled bool)

SetKeyRepeat wnables or disables key repeat for love.keypressed.

func SetTextInput

func SetTextInput(enabled bool)

SetTextInput enables or disables text input events. For reference of what text input is, please refer to HasTextInput

Types

type Key

type Key sdl.Keycode

Key corresponds to a keyboard key.

const (
	KeyUnknown            Key = Key(sdl.K_UNKNOWN)
	KeyReturn             Key = Key(sdl.K_RETURN)
	KeyEscape             Key = Key(sdl.K_ESCAPE)
	KeyBackSpace          Key = Key(sdl.K_BACKSPACE)
	KeyTab                Key = Key(sdl.K_TAB)
	KeySpace              Key = Key(sdl.K_SPACE)
	KeyExclaim            Key = Key(sdl.K_EXCLAIM)
	KeyDblQuote           Key = Key(sdl.K_QUOTEDBL)
	KeyHash               Key = Key(sdl.K_HASH)
	KeyPercent            Key = Key(sdl.K_PERCENT)
	KeyDollar             Key = Key(sdl.K_DOLLAR)
	KeyAmpersand          Key = Key(sdl.K_AMPERSAND)
	KeyQuote              Key = Key(sdl.K_QUOTE)
	KeyLeftparen          Key = Key(sdl.K_LEFTPAREN)
	KeyRightparen         Key = Key(sdl.K_RIGHTPAREN)
	KeyAsterisk           Key = Key(sdl.K_ASTERISK)
	KeyPlus               Key = Key(sdl.K_PLUS)
	KeyComma              Key = Key(sdl.K_COMMA)
	KeyMinus              Key = Key(sdl.K_MINUS)
	KeyPeriod             Key = Key(sdl.K_PERIOD)
	KeySlash              Key = Key(sdl.K_SLASH)
	Key0                  Key = Key(sdl.K_0)
	Key1                  Key = Key(sdl.K_1)
	Key2                  Key = Key(sdl.K_2)
	Key3                  Key = Key(sdl.K_3)
	Key4                  Key = Key(sdl.K_4)
	Key5                  Key = Key(sdl.K_5)
	Key6                  Key = Key(sdl.K_6)
	Key7                  Key = Key(sdl.K_7)
	Key8                  Key = Key(sdl.K_8)
	Key9                  Key = Key(sdl.K_9)
	KeyColon              Key = Key(sdl.K_COLON)
	KeySemicolon          Key = Key(sdl.K_SEMICOLON)
	KeyLess               Key = Key(sdl.K_LESS)
	KeyEquals             Key = Key(sdl.K_EQUALS)
	KeyGreater            Key = Key(sdl.K_GREATER)
	KeyQuestion           Key = Key(sdl.K_QUESTION)
	KeyAt                 Key = Key(sdl.K_AT)
	KeyLeftbracket        Key = Key(sdl.K_LEFTBRACKET)
	KeyBackslash          Key = Key(sdl.K_BACKSLASH)
	KeyRightbracket       Key = Key(sdl.K_RIGHTBRACKET)
	KeyCaret              Key = Key(sdl.K_CARET)
	KeyUnderscore         Key = Key(sdl.K_UNDERSCORE)
	KeyBackquote          Key = Key(sdl.K_BACKQUOTE)
	KeyA                  Key = Key(sdl.K_a)
	KeyB                  Key = Key(sdl.K_b)
	KeyC                  Key = Key(sdl.K_c)
	KeyD                  Key = Key(sdl.K_d)
	KeyE                  Key = Key(sdl.K_e)
	KeyF                  Key = Key(sdl.K_f)
	KeyG                  Key = Key(sdl.K_g)
	KeyH                  Key = Key(sdl.K_h)
	KeyI                  Key = Key(sdl.K_i)
	KeyJ                  Key = Key(sdl.K_j)
	KeyK                  Key = Key(sdl.K_k)
	KeyL                  Key = Key(sdl.K_l)
	KeyM                  Key = Key(sdl.K_m)
	KeyN                  Key = Key(sdl.K_n)
	KeyO                  Key = Key(sdl.K_o)
	KeyP                  Key = Key(sdl.K_p)
	KeyQ                  Key = Key(sdl.K_q)
	KeyR                  Key = Key(sdl.K_r)
	KeyS                  Key = Key(sdl.K_s)
	KeyT                  Key = Key(sdl.K_t)
	KeyU                  Key = Key(sdl.K_u)
	KeyV                  Key = Key(sdl.K_v)
	KeyW                  Key = Key(sdl.K_w)
	KeyX                  Key = Key(sdl.K_x)
	KeyY                  Key = Key(sdl.K_y)
	KeyZ                  Key = Key(sdl.K_z)
	KeyCapslock           Key = Key(sdl.K_CAPSLOCK)
	KeyF1                 Key = Key(sdl.K_F1)
	KeyF2                 Key = Key(sdl.K_F2)
	KeyF3                 Key = Key(sdl.K_F3)
	KeyF4                 Key = Key(sdl.K_F4)
	KeyF5                 Key = Key(sdl.K_F5)
	KeyF6                 Key = Key(sdl.K_F6)
	KeyF7                 Key = Key(sdl.K_F7)
	KeyF8                 Key = Key(sdl.K_F8)
	KeyF9                 Key = Key(sdl.K_F9)
	KeyF10                Key = Key(sdl.K_F10)
	KeyF11                Key = Key(sdl.K_F11)
	KeyF12                Key = Key(sdl.K_F12)
	KeyPrintscreen        Key = Key(sdl.K_PRINTSCREEN)
	KeyScrolllock         Key = Key(sdl.K_SCROLLLOCK)
	KeyPause              Key = Key(sdl.K_PAUSE)
	KeyInsert             Key = Key(sdl.K_INSERT)
	KeyHome               Key = Key(sdl.K_HOME)
	KeyPageup             Key = Key(sdl.K_PAGEUP)
	KeyDelete             Key = Key(sdl.K_DELETE)
	KeyEnd                Key = Key(sdl.K_END)
	KeyPagedown           Key = Key(sdl.K_PAGEDOWN)
	KeyRight              Key = Key(sdl.K_RIGHT)
	KeyLeft               Key = Key(sdl.K_LEFT)
	KeyDown               Key = Key(sdl.K_DOWN)
	KeyUp                 Key = Key(sdl.K_UP)
	KeyNumlockclear       Key = Key(sdl.K_NUMLOCKCLEAR)
	KeyApplication        Key = Key(sdl.K_APPLICATION)
	KeyPower              Key = Key(sdl.K_POWER)
	KeyF13                Key = Key(sdl.K_F13)
	KeyF14                Key = Key(sdl.K_F14)
	KeyF15                Key = Key(sdl.K_F15)
	KeyF16                Key = Key(sdl.K_F16)
	KeyF17                Key = Key(sdl.K_F17)
	KeyF18                Key = Key(sdl.K_F18)
	KeyF19                Key = Key(sdl.K_F19)
	KeyF20                Key = Key(sdl.K_F20)
	KeyF21                Key = Key(sdl.K_F21)
	KeyF22                Key = Key(sdl.K_F22)
	KeyF23                Key = Key(sdl.K_F23)
	KeyF24                Key = Key(sdl.K_F24)
	KeyExecute            Key = Key(sdl.K_EXECUTE)
	KeyHelp               Key = Key(sdl.K_HELP)
	KeyMenu               Key = Key(sdl.K_MENU)
	KeySelect             Key = Key(sdl.K_SELECT)
	KeyStop               Key = Key(sdl.K_STOP)
	KeyAgain              Key = Key(sdl.K_AGAIN)
	KeyUndo               Key = Key(sdl.K_UNDO)
	KeyCut                Key = Key(sdl.K_CUT)
	KeyCopy               Key = Key(sdl.K_COPY)
	KeyPaste              Key = Key(sdl.K_PASTE)
	KeyFind               Key = Key(sdl.K_FIND)
	KeyMute               Key = Key(sdl.K_MUTE)
	KeyVolumeup           Key = Key(sdl.K_VOLUMEUP)
	KeyVolumedown         Key = Key(sdl.K_VOLUMEDOWN)
	KeyCancel             Key = Key(sdl.K_CANCEL)
	KeyClear              Key = Key(sdl.K_CLEAR)
	KeyPrior              Key = Key(sdl.K_PRIOR)
	KeyReturn2            Key = Key(sdl.K_RETURN2)
	KeySeparator          Key = Key(sdl.K_SEPARATOR)
	KeyOut                Key = Key(sdl.K_OUT)
	KeyOper               Key = Key(sdl.K_OPER)
	KeyClearagain         Key = Key(sdl.K_CLEARAGAIN)
	KeyCrsel              Key = Key(sdl.K_CRSEL)
	KeyExsel              Key = Key(sdl.K_EXSEL)
	KeyThousandsSeparator Key = Key(sdl.K_THOUSANDSSEPARATOR)
	KeyDecimalSeparator   Key = Key(sdl.K_DECIMALSEPARATOR)
	KeyCurrencyUnit       Key = Key(sdl.K_CURRENCYUNIT)
	KeyCurrencySubUnit    Key = Key(sdl.K_CURRENCYSUBUNIT)
	KeyLCtrl              Key = Key(sdl.K_LCTRL)
	KeyLShift             Key = Key(sdl.K_LSHIFT)
	KeyLAlt               Key = Key(sdl.K_LALT)
	KeyLGui               Key = Key(sdl.K_LGUI)
	KeyRCtrl              Key = Key(sdl.K_RCTRL)
	KeyRShift             Key = Key(sdl.K_RSHIFT)
	KeyRAlt               Key = Key(sdl.K_RALT)
	KeyRGUI               Key = Key(sdl.K_RGUI)
	KeyMode               Key = Key(sdl.K_MODE)
	KeyAudioNext          Key = Key(sdl.K_AUDIONEXT)
	KeyAudioPrev          Key = Key(sdl.K_AUDIOPREV)
	KeyAudioStop          Key = Key(sdl.K_AUDIOSTOP)
	KeyAudioPlay          Key = Key(sdl.K_AUDIOPLAY)
	KeyAudioMute          Key = Key(sdl.K_AUDIOMUTE)
	KeyMediaSelect        Key = Key(sdl.K_MEDIASELECT)
)

func GetKeyFromScancode

func GetKeyFromScancode(code Scancode) Key

GetKeyFromScancode translates a scancode to key.

type Scancode

type Scancode uint32

Scancode is the id for a character independant of keyboard setup

const (
	ScancodeUnknown            Scancode = Scancode(sdl.SCANCODE_UNKNOWN)
	ScancodeA                  Scancode = Scancode(sdl.SCANCODE_A)
	ScancodeB                  Scancode = Scancode(sdl.SCANCODE_B)
	ScancodeC                  Scancode = Scancode(sdl.SCANCODE_C)
	ScancodeD                  Scancode = Scancode(sdl.SCANCODE_D)
	ScancodeE                  Scancode = Scancode(sdl.SCANCODE_E)
	ScancodeF                  Scancode = Scancode(sdl.SCANCODE_F)
	ScancodeG                  Scancode = Scancode(sdl.SCANCODE_G)
	ScancodeH                  Scancode = Scancode(sdl.SCANCODE_H)
	ScancodeI                  Scancode = Scancode(sdl.SCANCODE_I)
	ScancodeJ                  Scancode = Scancode(sdl.SCANCODE_J)
	ScancodeK                  Scancode = Scancode(sdl.SCANCODE_K)
	ScancodeL                  Scancode = Scancode(sdl.SCANCODE_L)
	ScancodeM                  Scancode = Scancode(sdl.SCANCODE_M)
	ScancodeN                  Scancode = Scancode(sdl.SCANCODE_N)
	ScancodeO                  Scancode = Scancode(sdl.SCANCODE_O)
	ScancodeP                  Scancode = Scancode(sdl.SCANCODE_P)
	ScancodeQ                  Scancode = Scancode(sdl.SCANCODE_Q)
	ScancodeR                  Scancode = Scancode(sdl.SCANCODE_R)
	ScancodeS                  Scancode = Scancode(sdl.SCANCODE_S)
	ScancodeT                  Scancode = Scancode(sdl.SCANCODE_T)
	ScancodeU                  Scancode = Scancode(sdl.SCANCODE_U)
	ScancodeV                  Scancode = Scancode(sdl.SCANCODE_V)
	ScancodeW                  Scancode = Scancode(sdl.SCANCODE_W)
	ScancodeX                  Scancode = Scancode(sdl.SCANCODE_X)
	ScancodeY                  Scancode = Scancode(sdl.SCANCODE_Y)
	ScancodeZ                  Scancode = Scancode(sdl.SCANCODE_Z)
	Scancode1                  Scancode = Scancode(sdl.SCANCODE_1)
	Scancode2                  Scancode = Scancode(sdl.SCANCODE_2)
	Scancode3                  Scancode = Scancode(sdl.SCANCODE_3)
	Scancode4                  Scancode = Scancode(sdl.SCANCODE_4)
	Scancode5                  Scancode = Scancode(sdl.SCANCODE_5)
	Scancode6                  Scancode = Scancode(sdl.SCANCODE_6)
	Scancode7                  Scancode = Scancode(sdl.SCANCODE_7)
	Scancode8                  Scancode = Scancode(sdl.SCANCODE_8)
	Scancode9                  Scancode = Scancode(sdl.SCANCODE_9)
	Scancode0                  Scancode = Scancode(sdl.SCANCODE_0)
	ScancodeReturn             Scancode = Scancode(sdl.SCANCODE_RETURN)
	ScancodeEscape             Scancode = Scancode(sdl.SCANCODE_ESCAPE)
	ScancodeBackspace          Scancode = Scancode(sdl.SCANCODE_BACKSPACE)
	ScancodeTab                Scancode = Scancode(sdl.SCANCODE_TAB)
	ScancodeSpace              Scancode = Scancode(sdl.SCANCODE_SPACE)
	ScancodeMinus              Scancode = Scancode(sdl.SCANCODE_MINUS)
	ScancodeEquals             Scancode = Scancode(sdl.SCANCODE_EQUALS)
	ScancodeLeftbracket        Scancode = Scancode(sdl.SCANCODE_LEFTBRACKET)
	ScancodeRightbracket       Scancode = Scancode(sdl.SCANCODE_RIGHTBRACKET)
	ScancodeBackslash          Scancode = Scancode(sdl.SCANCODE_BACKSLASH)
	ScancodeNonushash          Scancode = Scancode(sdl.SCANCODE_NONUSHASH)
	ScancodeSemicolon          Scancode = Scancode(sdl.SCANCODE_SEMICOLON)
	ScancodeApostrophe         Scancode = Scancode(sdl.SCANCODE_APOSTROPHE)
	ScancodeGrave              Scancode = Scancode(sdl.SCANCODE_GRAVE)
	ScancodeComma              Scancode = Scancode(sdl.SCANCODE_COMMA)
	ScancodePeriod             Scancode = Scancode(sdl.SCANCODE_PERIOD)
	ScancodeSlash              Scancode = Scancode(sdl.SCANCODE_SLASH)
	ScancodeCapslock           Scancode = Scancode(sdl.SCANCODE_CAPSLOCK)
	ScancodeF1                 Scancode = Scancode(sdl.SCANCODE_F1)
	ScancodeF2                 Scancode = Scancode(sdl.SCANCODE_F2)
	ScancodeF3                 Scancode = Scancode(sdl.SCANCODE_F3)
	ScancodeF4                 Scancode = Scancode(sdl.SCANCODE_F4)
	ScancodeF5                 Scancode = Scancode(sdl.SCANCODE_F5)
	ScancodeF6                 Scancode = Scancode(sdl.SCANCODE_F6)
	ScancodeF7                 Scancode = Scancode(sdl.SCANCODE_F7)
	ScancodeF8                 Scancode = Scancode(sdl.SCANCODE_F8)
	ScancodeF9                 Scancode = Scancode(sdl.SCANCODE_F9)
	ScancodeF10                Scancode = Scancode(sdl.SCANCODE_F10)
	ScancodeF11                Scancode = Scancode(sdl.SCANCODE_F11)
	ScancodeF12                Scancode = Scancode(sdl.SCANCODE_F12)
	ScancodePrintscreen        Scancode = Scancode(sdl.SCANCODE_PRINTSCREEN)
	ScancodeScrolllock         Scancode = Scancode(sdl.SCANCODE_SCROLLLOCK)
	ScancodePause              Scancode = Scancode(sdl.SCANCODE_PAUSE)
	ScancodeInsert             Scancode = Scancode(sdl.SCANCODE_INSERT)
	ScancodeHome               Scancode = Scancode(sdl.SCANCODE_HOME)
	ScancodePageup             Scancode = Scancode(sdl.SCANCODE_PAGEUP)
	ScancodeDelete             Scancode = Scancode(sdl.SCANCODE_DELETE)
	ScancodeEnd                Scancode = Scancode(sdl.SCANCODE_END)
	ScancodePagedown           Scancode = Scancode(sdl.SCANCODE_PAGEDOWN)
	ScancodeRight              Scancode = Scancode(sdl.SCANCODE_RIGHT)
	ScancodeLeft               Scancode = Scancode(sdl.SCANCODE_LEFT)
	ScancodeDown               Scancode = Scancode(sdl.SCANCODE_DOWN)
	ScancodeUp                 Scancode = Scancode(sdl.SCANCODE_UP)
	ScancodeNumlockclear       Scancode = Scancode(sdl.SCANCODE_NUMLOCKCLEAR)
	ScancodeNonusbackslash     Scancode = Scancode(sdl.SCANCODE_NONUSBACKSLASH)
	ScancodeApplication        Scancode = Scancode(sdl.SCANCODE_APPLICATION)
	ScancodePower              Scancode = Scancode(sdl.SCANCODE_POWER)
	ScancodeF13                Scancode = Scancode(sdl.SCANCODE_F13)
	ScancodeF14                Scancode = Scancode(sdl.SCANCODE_F14)
	ScancodeF15                Scancode = Scancode(sdl.SCANCODE_F15)
	ScancodeF16                Scancode = Scancode(sdl.SCANCODE_F16)
	ScancodeF17                Scancode = Scancode(sdl.SCANCODE_F17)
	ScancodeF18                Scancode = Scancode(sdl.SCANCODE_F18)
	ScancodeF19                Scancode = Scancode(sdl.SCANCODE_F19)
	ScancodeF20                Scancode = Scancode(sdl.SCANCODE_F20)
	ScancodeF21                Scancode = Scancode(sdl.SCANCODE_F21)
	ScancodeF22                Scancode = Scancode(sdl.SCANCODE_F22)
	ScancodeF23                Scancode = Scancode(sdl.SCANCODE_F23)
	ScancodeF24                Scancode = Scancode(sdl.SCANCODE_F24)
	ScancodeExecute            Scancode = Scancode(sdl.SCANCODE_EXECUTE)
	ScancodeHelp               Scancode = Scancode(sdl.SCANCODE_HELP)
	ScancodeMenu               Scancode = Scancode(sdl.SCANCODE_MENU)
	ScancodeSelect             Scancode = Scancode(sdl.SCANCODE_SELECT)
	ScancodeStop               Scancode = Scancode(sdl.SCANCODE_STOP)
	ScancodeAgain              Scancode = Scancode(sdl.SCANCODE_AGAIN)
	ScancodeUndo               Scancode = Scancode(sdl.SCANCODE_UNDO)
	ScancodeCut                Scancode = Scancode(sdl.SCANCODE_CUT)
	ScancodeCopy               Scancode = Scancode(sdl.SCANCODE_COPY)
	ScancodePaste              Scancode = Scancode(sdl.SCANCODE_PASTE)
	ScancodeFind               Scancode = Scancode(sdl.SCANCODE_FIND)
	ScancodeMute               Scancode = Scancode(sdl.SCANCODE_MUTE)
	ScancodeVolumeup           Scancode = Scancode(sdl.SCANCODE_VOLUMEUP)
	ScancodeVolumedown         Scancode = Scancode(sdl.SCANCODE_VOLUMEDOWN)
	ScancodeInternational1     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL1)
	ScancodeInternational2     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL2)
	ScancodeInternational3     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL3)
	ScancodeInternational4     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL4)
	ScancodeInternational5     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL5)
	ScancodeInternational6     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL6)
	ScancodeInternational7     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL7)
	ScancodeInternational8     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL8)
	ScancodeInternational9     Scancode = Scancode(sdl.SCANCODE_INTERNATIONAL9)
	ScancodeLang1              Scancode = Scancode(sdl.SCANCODE_LANG1)
	ScancodeLang2              Scancode = Scancode(sdl.SCANCODE_LANG2)
	ScancodeLang3              Scancode = Scancode(sdl.SCANCODE_LANG3)
	ScancodeLang4              Scancode = Scancode(sdl.SCANCODE_LANG4)
	ScancodeLang5              Scancode = Scancode(sdl.SCANCODE_LANG5)
	ScancodeLang6              Scancode = Scancode(sdl.SCANCODE_LANG6)
	ScancodeLang7              Scancode = Scancode(sdl.SCANCODE_LANG7)
	ScancodeLang8              Scancode = Scancode(sdl.SCANCODE_LANG8)
	ScancodeLang9              Scancode = Scancode(sdl.SCANCODE_LANG9)
	ScancodeAlterase           Scancode = Scancode(sdl.SCANCODE_ALTERASE)
	ScancodeSysreq             Scancode = Scancode(sdl.SCANCODE_SYSREQ)
	ScancodeCancel             Scancode = Scancode(sdl.SCANCODE_CANCEL)
	ScancodeClear              Scancode = Scancode(sdl.SCANCODE_CLEAR)
	ScancodePrior              Scancode = Scancode(sdl.SCANCODE_PRIOR)
	ScancodeReturn2            Scancode = Scancode(sdl.SCANCODE_RETURN2)
	ScancodeSeparator          Scancode = Scancode(sdl.SCANCODE_SEPARATOR)
	ScancodeOut                Scancode = Scancode(sdl.SCANCODE_OUT)
	ScancodeOper               Scancode = Scancode(sdl.SCANCODE_OPER)
	ScancodeClearagain         Scancode = Scancode(sdl.SCANCODE_CLEARAGAIN)
	ScancodeCrsel              Scancode = Scancode(sdl.SCANCODE_CRSEL)
	ScancodeExsel              Scancode = Scancode(sdl.SCANCODE_EXSEL)
	ScancodeThousandsseparator Scancode = Scancode(sdl.SCANCODE_THOUSANDSSEPARATOR)
	ScancodeDecimalseparator   Scancode = Scancode(sdl.SCANCODE_DECIMALSEPARATOR)
	ScancodeCurrencyunit       Scancode = Scancode(sdl.SCANCODE_CURRENCYUNIT)
	ScancodeCurrencysubunit    Scancode = Scancode(sdl.SCANCODE_CURRENCYSUBUNIT)
	ScancodeLctrl              Scancode = Scancode(sdl.SCANCODE_LCTRL)
	ScancodeLshift             Scancode = Scancode(sdl.SCANCODE_LSHIFT)
	ScancodeLalt               Scancode = Scancode(sdl.SCANCODE_LALT)
	ScancodeLgui               Scancode = Scancode(sdl.SCANCODE_LGUI)
	ScancodeRctrl              Scancode = Scancode(sdl.SCANCODE_RCTRL)
	ScancodeRshift             Scancode = Scancode(sdl.SCANCODE_RSHIFT)
	ScancodeRalt               Scancode = Scancode(sdl.SCANCODE_RALT)
	ScancodeRgui               Scancode = Scancode(sdl.SCANCODE_RGUI)
	ScancodeMode               Scancode = Scancode(sdl.SCANCODE_MODE)
	ScancodeAudionext          Scancode = Scancode(sdl.SCANCODE_AUDIONEXT)
	ScancodeAudioprev          Scancode = Scancode(sdl.SCANCODE_AUDIOPREV)
	ScancodeAudiostop          Scancode = Scancode(sdl.SCANCODE_AUDIOSTOP)
	ScancodeAudioplay          Scancode = Scancode(sdl.SCANCODE_AUDIOPLAY)
	ScancodeAudiomute          Scancode = Scancode(sdl.SCANCODE_AUDIOMUTE)
	ScancodeMediaselect        Scancode = Scancode(sdl.SCANCODE_MEDIASELECT)
	NumScancodes               Scancode = Scancode(sdl.NUM_SCANCODES)
)

func GetScancodeFromKey

func GetScancodeFromKey(key Key) Scancode

GetScancodeFromKey translates a key to scancode.

Jump to

Keyboard shortcuts

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