In Windows, ctrl
works as the fn
key, but in macOS, command
works as the fn
key in general.
There are some awesome libraries out there could make this easy:
ccampbell/mousetrap: https://github.com/ccampbell/mousetrap
madrobby/keymaster: https://github.com/madrobby/keymaster
1条答案
按热度按时间izj3ouym1#
After some digging on the source codes, I'd think that the key binding logic could be split into a separate module for long term implementation and optimization:
And splitting these codes into a separate module can definitely makes the codes more readable, maintainable and extensible.