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
|
|
@ -24,6 +24,7 @@ typedef struct binding {
|
|||
INT bi_code;
|
||||
tkey_t *bi_key;
|
||||
function_t *bi_func;
|
||||
WCHAR *bi_macro;
|
||||
|
||||
TTS_TAILQ_ENTRY(binding) bi_entries;
|
||||
} binding_t;
|
||||
|
|
@ -32,6 +33,6 @@ typedef TTS_TAILQ_HEAD(bindlist, binding) binding_list_t;
|
|||
extern binding_list_t bindings;
|
||||
|
||||
tkey_t *find_key(const WCHAR *name);
|
||||
void bind_key(const WCHAR *key, const WCHAR *func);
|
||||
void bind_key(const WCHAR *key, const WCHAR *func, int is_macro);
|
||||
|
||||
#endif /* !TTS_BINDINGS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue