Convert between key-strings and key-codes. Also provides functionality for querying and changing keyboard layouts.
Signature | hs.keycodes.map |
---|---|
Type | Constant |
Description | A mapping from string representation of a key to its keycode, and vice versa. |
Notes |
|
Source | extensions/keycodes/keycodes.lua line 67 |
Signature | hs.keycodes.currentLayout() -> string |
---|---|
Type | Function |
Description | Gets the name of the current keyboard layout |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 370 |
Signature | hs.keycodes.currentLayoutIcon() -> hs.image object |
---|---|
Type | Function |
Description | Gets the icon of the current keyboard layout |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 387 |
Signature | hs.keycodes.currentMethod() -> string |
---|---|
Type | Function |
Description | Get current input method |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 472 |
Signature | hs.keycodes.currentSourceID([sourceID]) -> string | boolean |
---|---|
Type | Function |
Description | Get or set the source id for the keyboard input source |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 334 |
Signature | hs.keycodes.iconForLayoutOrMethod(sourceName) -> hs.image object |
---|---|
Type | Function |
Description | Gets an hs.image object for a given keyboard layout or input method |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/keycodes/libkeycodes.m line 566 |
Signature | hs.keycodes.inputSourceChanged(fn) |
---|---|
Type | Function |
Description | Sets the function to be called when your input source (i.e. qwerty, dvorak, colemac) changes. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/keycodes/keycodes.lua line 87 |
Signature | hs.keycodes.layouts([sourceID]) -> table |
---|---|
Type | Function |
Description | Gets all of the enabled keyboard layouts that the keyboard input source can be switched to |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/keycodes/libkeycodes.m line 404 |
Signature | hs.keycodes.methods([sourceID]) -> table |
---|---|
Type | Function |
Description | Gets all of the enabled input methods that the keyboard input source can be switched to |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/keycodes/libkeycodes.m line 438 |
Signature | hs.keycodes.setLayout(layoutName) -> boolean |
---|---|
Type | Function |
Description | Changes the system keyboard layout |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 502 |
Signature | hs.keycodes.setMethod(methodName) -> boolean |
---|---|
Type | Function |
Description | Changes the system input method |
Parameters |
|
Returns |
|
Source | extensions/keycodes/libkeycodes.m line 534 |