#290: bindable key functions in CLI (Invalid)
Nov 09 2007 * 12:35
| Reported by: | Release: | ||
|---|---|---|---|
| Priority: | Enhancement | Milestone: | Generic future releases |
| Component: | Assigned to: | mjagdis |
Add to the CLI / Console capability of using function keys F1..F12 to use the most used debugging commands: sip show peers; sip show channels; etc.
rl_set_key ( "\e[[A", custom_f1, rl_binding_keymap );Changelog:
Modified by
Nov 09 2007 * 13:31
Modified by
Nov 19 2007 * 15:50
whatever, if you’re going to use readline for any CLI/utility/whatever this is how to intercept functions keys when logged via Putty (TERM=xterm) with/without screen:
// disable TAB
rl_bind_key ('\t', custom_ding);
// F1
rl_set_key ( "\e[11~", custom_f1, emacs_standard_keymap );
rl_set_key ( "\e[12~", custom_f2, emacs_standard_keymap );
rl_set_key ( "\e[13~", custom_f3, emacs_standard_keymap );
rl_set_key ( "\e[14~", custom_f4, emacs_standard_keymap );
rl_set_key ( "\e[15~", custom_f5, emacs_standard_keymap );
rl_set_key ( "\e[17~", custom_f6, emacs_standard_keymap );
rl_set_key ( "\e[18~", custom_f7, emacs_standard_keymap );
rl_set_key ( "\e[19~", custom_f8, emacs_standard_keymap );
rl_set_key ( "\e[20~", custom_f9, emacs_standard_keymap );
rl_set_key ( "\e[21~", custom_f10, emacs_standard_keymap );
rl_set_key ( "\e[23~", custom_f11, emacs_standard_keymap );
rl_set_key ( "\e[24~", custom_f12, emacs_standard_keymap );
Modified by
Jun 05 2010 * 16:01
- Assigned user: set to mjagdis
- Status: changed from Open to Invalid
See the documentation for readline and in particular the documentation for .inputrc.
With trunk you can use “if CallWeaver” in .inputrc to make mappings specific to callweaver. Plus in trunk remote consoles run under the invoking user’s identity so each user can have their own mappings in their .inputrc, all separate and distinct from each other and the built in console (which will be running as the configured “callweaver” user).
![Home ticket #290 [home]](/images/logo.png?1180520111)

RSS Feeds
This looks like a good idea, somehow, but then, the CLI itself should be removed and replaced by a clean client/server model, so I don’t know…