In the case of the bookmarks toolwindow, slickedit will "import" your relevant keybindings for you so that if you have say F5 bound to "set-bookmark", then when the bookmarks tool window has focus, F5 will still set a bookmark on the current source window line.
The bookmarks tool window also has some "secret" key bindings - INS actually does set-bookmark.
void ctl_bookmarks_tree.INS()
{
if (!_no_child_windows()) {
_mdi.p_child.set_bookmark("-n");
}
}
You can add your own "hotkeys" either dynamically or statically but you need to check they're not already assigned.
Here's an example from slick source code on how to do it dynamically
/**
* Make the current form respond to the keys to control the preview window
*/
void _MakePreviewWindowShortcuts()
{
set_eventtab_index(p_eventtab, event2index(C_UP), find_index("preview_cursor_up", COMMAND_TYPE));
set_eventtab_index(p_eventtab, event2index(C_DOWN), find_index("preview_cursor_down", COMMAND_TYPE));
set_eventtab_index(p_eventtab, event2index(C_PGUP), find_index("preview_page_up", COMMAND_TYPE));
set_eventtab_index(p_eventtab, event2index(C_PGDN), find_index("preview_page_down", COMMAND_TYPE));
}
Then in tags.e it does this
p_active_form._MakePreviewWindowShortcuts();
- this allows the preview window to be scrolled up down using Ctrl-up / down etc when the focus is on another form.
To assign keys statically you can do this kind of thing - this code can go in a slick c file of your own - make sure you #include "slick.sh"
defeventtab _tbbookmarks_form;
void ctl_bookmarks_tree."n","N"()
{
if (!_no_child_windows()) {
_mdi.p_child.set_bookmark('-n');
}
}