Mulyadi Santosa wrote:
> On Wed, Oct 21, 2009 at 11:24 PM, Glauber Costa <[email protected]> wrote:
> > You can provide a monitor command to do that
> >
> > something in the lines of:
> > - add_macro <key> <command_list>
> > - remove_macro <key>
> > - list_macros
>
> Please CMIIW, "command_list" here refers to at least one of monitor
> commands, right? meaning, i.e one could do:
> add_macro ctrl_alt_shift_s "stop"
>
> or extend that so it does:
> add_macro ctrl_alt_shift_s "stop print $pc"
>
> so, it stops the VM followed by printing program counter.
If the monitor accepted ";" as a command separator, to put multiple
commands on a single line, <command_list> could just be a quoted
string which is processed as a line.
If we're going to have keyboard macros, it would be nice and probably
very easy to have monitor macros too - monitor commands which expand
to a line in the same way.
The number of times I've typed things like send_key control-alt-del
and would have appreciated a "cad" macro...
Syntax idea comes to mind is:
- Add ";" as command separator.
- add_macro <name> <command-string>
- remove_macro <name>
- list_macros
- add_key key <key> <command-string>
- remove_key <key> <command-string>
- list_keys
(If I were starting from nothing it'd be macro_add, macro_remove
etc. or maybe "macro add", but the above seems more consistent with
the existing monitor)
-- Jamie