chewing / chewing-editor

Cross platform chewing user phrase editor
https://chewing.im/
GNU General Public License v2.0
31 stars 52 forks source link

Add Hotkeys to do something #107

Closed YWJamesLin closed 8 years ago

YWJamesLin commented 8 years ago

I'd like to add some key binding to the application. example. ctrl + w to close the app. ctrl + a to add phrase, etc. Maybe I should put on a issue like this to obtain some opinions XD

Chocobo1 commented 8 years ago

ctrl + w to close the app

there is already alt + f4 and it works universally on all OS.

ctrl + a: add phrase

agree with this one. UPDATE: ctrl + a is commonly used as select all. maybe ctrl + n would be a good alternative?

some ideas, how about: ctrl + d (or just delete?): delete entry ctrl + r: refresh list enter: modify existing phrase

cyng93 commented 8 years ago

I suppose "delete" would be a better choice than "ctrl+d" ?

YWJamesLin commented 8 years ago

Great!

Delete : delete entry
ctrl + r : refresh list
enter: modify existing phrase
ctrl + n : add phrase

there is already alt + f4 and it works universally on all OS. Since I use Linux with Awesome WM, it does not have this kind of hotkey. However, some Linux applications have hotkey Ctrl + Q to close the application, and I can directly close the application.

david50407 commented 8 years ago

ctrl + w to close the app

there is already alt + f4 and it works universally on all OS.

Alt+F4 also not closing application on Mac OS X. :'(

However, some Linux applications have hotkey Ctrl + Q to close the application, and I can directly close the application.

On Mac OS X, Cmd+Q usually closes the application, and on Windows, Ctrl+Q/W often set as closing application, too.

(attachment is the menu in Firefox on OS X, it uses Cmd+Q to close app.) 2016-03-25 10 16 18

david50407 commented 8 years ago

I found that on OS X, it will auto-add the close item on main menu

2016-03-25 10 53 30

Chocobo1 commented 8 years ago

Since I use Linux with Awesome WM, it does not have this kind of hotkey. ... Alt+F4 also not closing application on Mac OS X.

Thanks for the info since I don't have a mac & can't test all DEs out there.

However, some Linux applications have hotkey Ctrl + Q to close the application, and I can directly close the application.

I can agree with Ctrl + Q for exit action.

Chocobo1 commented 8 years ago

Please test #138.

It may bind to different keys than what we agreed on, because Qt has defined some "StandardKeys": https://doc.qt.io/qt-5/qkeysequence.html#StandardKey-enum

should be better if we follow that.