laurent.orseau
2021-10-23 07:54:17

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?


laurent.orseau
2021-10-23 13:57:45

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!)


laurent.orseau
2021-10-23 14:06:58

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).


spdegabrielle
2021-10-23 14:09:52

That is cool! I’ll submit to @pocmatos for next Racket News


robby
2021-10-23 14:20:03

Yes, I think so. I forget how that works exactly, tho. I think there are multiple labels and the labels get switched out?


robby
2021-10-23 14:24:46

Looks like you need to use this part of the framework: https://docs.racket-lang.org/framework/Menu.html


robby
2021-10-23 14:25:12

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.


laurent.orseau
2021-10-23 15:02:28

I always struggle to find a good shortcut default :smile: c:s:i doesn’t seem to be bound right now


laurent.orseau
2021-10-23 15:07:41

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


laurent.orseau
2021-10-23 15:11:05

robby
2021-10-23 15:23:36

I am not sure what you are saying. Are you saying that it doesn’t work?


laurent.orseau
2021-10-23 17:12:12

No, only that i need to do it :)


robby
2021-10-23 20:22:02

Ah! :)


robby
2021-10-23 20:22:43

I think it might be easiest to just use the classes in that library everywhere instead of using the racket/gui classes.