Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: keyboard shortcuts (Read 3405 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

keyboard shortcuts

I've researched a bit before posting, but haven't found a good example on how to register keyboard shortcuts.
I believe it has something to do with keyboard_shortcut_manager but couldn't figure out how to use it for that purpose.

keyboard shortcuts

Reply #1
They are just menu commands that you create with mainmenu_commands or whatever the similar context one is.
You then make them "keyboard only" by returning false from get_display()

keyboard shortcuts

Reply #2
They are just menu commands that you create with mainmenu_commands or whatever the similar context one is.
You then make them "keyboard only" by returning false from get_display()


It works using mainmenu_commands but I can't figure how to have context popup menu entries appear in preferences/general/keyboard shortcuts.

I'm using classes derived from contextmenu_item_* for a dynamically generated popup menu...
there's a function called  is_mappable_shortcut() but return true does nothing and it's never called anyway...

I could create a fake  mainmenu_commands but I'd like to avoid it.

Congrat to the author of one of the more obfuscated system ever to create menus

 

keyboard shortcuts

Reply #3
I know contextmenu_item_simple works because I've personally used that one. I'm not sure about the other variations of contextmenu_items though.