I am using v17 but 'unused keys' is an infinite set since it is a multi-key hotkey system. I imagine it can be done based on the existing key-tree, but I would not want to write it.
If you are looking for a quick manual way to find empty key-paths, use the following:
// list keys in sorted fashion to new buffer
_command list_keydefs()
// Find command assigned to a key-path
_command what_is()
// Find commands assigned to key-paths
_command what_are()
// Find key-paths assigned to command
_command where_is(_str commandName='', _str quiet='',_str separatorChar=',') name_info(COMMAND_ARG',')
// Bind to a key
_command bind_to_key(_str commandName='') name_info(COMMAND_ARG',')
// Bind current word (proc name) to key
_command bind_cur_word_alt(){
if (command_state()) {
return(0);
}
_str s=cur_word(0);
if (s==''||!is_cmd(s)) {
s=current_proc_name(false);
}
if (!is_cmd(s)) {
_message_box(s' is not a command');
return(0);
}
_str sa=letter_prompt('Number of Keys or 0 to Quit','1234567890');
if (sa==''||sa=='0') {
_message_box(1);return(0);
}
_str ss='-'sa' -r 's;
bind_to_key(ss);
ss=where_is(s,1);
sticky_message(ss);
}
// utils
_command is_cmd(...){
_str p=current_proc(false);//was current_proc_name
if (arg()==1) {
p=arg(1);
}
return(find_index(p,COMMAND_TYPE)!=0);
}