简体   繁体   中英

how to add keyboard shortcut keys to milonic menu

I am using milonicmenu ( http://www.milonic.com/ ) for my application. How can I put keyboard shortcuts to make the menu keyboardfriendly?

With a library like https://github.com/blainekasten/shortcut.js It should be pretty simple, basically choose the shortcut, and bindTo one of the functions that do what you want to happen.

For example, with that library you could do

shortcut('o').bindsTo(openMenu);

Here, pressing the o button will call the openMenu function, which would in theory open your milonicmenu.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM