Mnemonics and shortcuts



We are developing an integrated development environment 
   https://libre2.adacore.com/gps/

As part of it, we want users to be able to redefine key bindings (of 
course...). However, I have problems when I am trying for instance to 
associate alt-w to /Edit/Copy, since alt-w is also a mnemonic set for the 
_Window  menu.

As a result, calling  gtk_accel_map_change_entry doesn't succeed for alt-w.

I haven't found a public function to disable that mnemonic before I attempt to 
change the accel map entry. All the functions I have found seem to be private 
(ie _gtk_window_query_nonaccels or all functions in gtkmnemonichash.h).

What we do for now is that we have our own handling of shortcuts (so that we 
can have multi-key shortcuts similar to Emacs, like ctrl-x ctrl-s). alt-w is 
thus stored in there, and we correctly execute Copy from there, but the 
shortcut doesn't appear in the menu, which is confusing for users.

Any hint would be appreciated!

regards
Emmanuel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]