Add macro support.
Replace WGETCH() with input_char(), which works the same except it supports an input buffer. Calling input_macro(s) sets the input buffer to 's'. The input buffer is returned by input_char() as if it had been typed by the user. If an error occurs (cmderr()), the input buffer is cleared.
This commit is contained in:
parent
44b2e4371e
commit
3440a87ea3
9 changed files with 159 additions and 49 deletions
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#set bill_advance 0
|
||||
|
||||
#### Bindings
|
||||
#### Bindings and macros
|
||||
#
|
||||
# Use the 'bind' command to (re)define keybindings. Type '?' while TTS is
|
||||
# running for a full list of key bindings.
|
||||
|
|
@ -45,6 +45,12 @@
|
|||
bind j next
|
||||
bind k prev
|
||||
|
||||
# Macros work in a similar way to bindings, except the second argument is a
|
||||
# string which will be executed as if it was typed. For example, the
|
||||
# following macro would add a new entry called "test", and set its timer to
|
||||
# 30 minutes.
|
||||
#macro t "atest\n+30:00\n"
|
||||
|
||||
#### Styling
|
||||
#
|
||||
# You can style UI elements with the 'style' command. Its syntax is:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue