Unrelated, but i noticed that when disabling shortcuts in menus, it also disables the alt-… access to menus, except for Quickscript. Should i do something about it?
Finally, this works: (send kmap call-function (string-constant cs-rename-id) defs (new event%) #t)
(I had forgotten to chain with the other keymaps in the last argument!)
Rename Identifier is now available as a quickscript: https://gist.github.com/Metaxal/a9dc34faaff4ec7e3c7872b63cc1b76f (cc @spdegabrielle) This is useful if you have checked “Enable keybindings in menus” and you want to call “Rename identifier” via a keyboard shortcut (to customize in the quickscript), or via “Alt-s, f, i” (navigate the menus with the keyboard).
That is cool! I’ll submit to @pocmatos for next Racket News
Yes, I think so. I forget how that works exactly, tho. I think there are multiple labels and the labels get switched out?
Looks like you need to use this part of the framework: https://docs.racket-lang.org/framework/Menu.html
If you think there is a useful keyboard shortcut that should be on by default for linux and windows, I’d be happy to add it.
I always struggle to find a good shortcut default :smile: c:s:i doesn’t seem to be bound right now
So I guess I need to mixin with this one: https://docs.racket-lang.org/framework/Menu.html#%28def._%28%28lib._framework%2Fmain..rkt%29._menu~3acan-restore-underscore-mixin%29%29
Apparently this can be done for submenus and menu items, but I don’t see the utility there, since once a dropdown menu is activated, it takes all the focus, so the Emacs keybindings can’t work anyway
I am not sure what you are saying. Are you saying that it doesn’t work?
No, only that i need to do it :)
Ah! :)
I think it might be easiest to just use the classes in that library everywhere instead of using the racket/gui classes.