-
Notifications
You must be signed in to change notification settings - Fork 53
Keyboard macro
HASUMI Hitoshi edited this page Aug 12, 2022
·
2 revisions
0.9.0+
kbd.add_layer :default, %i(MACRO_1 MACRO_2)
kbd.define_mode_key :MACRO_1, [ Proc.new { kbd.macro("Hello") }, nil, 200, nil]
kbd.define_mode_key :MACRO_2, [ Proc.new { kbd.macro("World!") }, nil, 200, nil]
These macros add a line feed.
If you want it not to add a line feed, add an empty array []
at the second argument:
Proc.new { kbd.macro("Hello", []) }
The second argument accepts an array of the following symbols: :ENTER
:ESCAPE
:BSPACE
:TAB
:PGUP
:DELETE
:END
:PGDOWN
:RIGHT
:LEFT
:DOWN
and :UP
.
The default value of the second argument is [:ENTER]
.
This is the reason that a line feed is added when you don't pass any second argument.
- Getting started
- Keyboard features
- Keycodes (ja)
- Mouse (ja)
- Layers and mode key (ja)
- Debounce
- Composite key
- Split-type keyboard
- Keyscan matrix
- Num Lock, Caps Lock and Scroll Lock
- Useful methods that make you free
- BIOS mode
- Other features
- Examples
- Development
- Contribute to the Wiki
- FAQ