Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyboardMap = map[string]int{}/* 151 elements not displayed */
View Source
var LegacyKeyboardMap map[int]string
Functions ¶
func GetLegacyKey ¶
func IsShiftedKey ¶ added in v2.15.0
IsShiftedKey reports whether name maps to a shift-modified key (negative code). If so, it returns the positive base keycode that must be pressed while LeftShift is held. Returns 0, false for unshifted keys, braced specials that are not shift-modified, and unknown names.
func ParseKeyCombo ¶ added in v2.18.0
ParseKeyCombo parses a keyboard key argument string and returns the corresponding key codes. It supports both single keys (e.g., "a", "{f9}") and combo keys with the "+" delimiter (e.g., "{ctrl+q}", "{shift+a}").
The function returns:
- codes: slice of keyboard codes
- isCombo: true if multiple keys detected, false for a single key
- error: if any key name is unknown
Examples:
- ParseKeyCombo("a") -> [30], false, nil
- ParseKeyCombo("{f9}") -> [67], false, nil
- ParseKeyCombo("{ctrl+q}") -> [29, 16], true, nil
- ParseKeyCombo("{shift+a}") -> [42, 30], true, nil
func SetupLegacyKeyboardMap ¶
func SetupLegacyKeyboardMap()
func ToKeyboardCode ¶ added in v2.18.0
ToKeyboardCode converts a single ZapScript key symbol to a keyboard code.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.