mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 47 forks source link

Add shortcut to start mate-control-center #244

Closed zhangxianwei8 closed 5 years ago

zhangxianwei8 commented 5 years ago

Some laptops have a setting hotkey, such as F9 key on Thinkpad L380. This is bound by default to XF86Tools. Add shortcut to start mate-control-center to support it.

Looking at this F9 hotkey: 15393275062

Ported from gnome-settings-daemon: https://github.com/GNOME/gnome-settings-daemon/commit/b4668fa58e6048cdd10aacebd0bd513ae132364d

zhangxianwei8 commented 5 years ago

@lukefromdc @raveit65 Could you please review the code? Thanks:)

lukefromdc commented 5 years ago

My only laptop that still runs does not support any of these hotkeys, so I can't run a functional test

zhangxianwei8 commented 5 years ago

Who can test this?

lukefromdc commented 5 years ago

The code itself looks good, following the template of other such functions and not freeing the cmd variable like the other options do

raveit65 commented 5 years ago

Not sure if my notebook have such a key. How can i list all keys, like XF86Tools, from my keyboard ?

zhangxianwei8 commented 5 years ago

'xev' command can print contents of X events which your keyboard supports.

zhangxianwei8 commented 5 years ago

I just know some kind of thinkpad laptop support this key.

zhangxianwei8 commented 5 years ago

If nobody can test this PR but me, then how to merge?

raveit65 commented 5 years ago

It is testable :) Add this line to /usr/share/mate-control-center/keybindings/01-desktop-key.xml <KeyListEntry name="control-center" description="Launch settings"/> Than open mate-keyboard-properties and you will see the new editable keybinding. I changed the default to Mod4+Z or whatever key you want. Et voila, i can open m-c-c with the new keybinding :) bildschirmfoto zu 2018-10-16 19-39-40

Feel free to open a new PR for m-c-c and add the new line to https://github.com/mate-desktop/mate-control-center/blob/master/capplets/keybindings/01-desktop-key.xml.in

I think having an editable keybinding is very useful for all users.

zhangxianwei8 commented 5 years ago

Already done it!

zhangxianwei8 commented 5 years ago

Hi @lukefromdc you can test with this PR in m-c-c https://github.com/mate-desktop/mate-control-center/pull/380 .

lukefromdc commented 5 years ago

Worked on the desktop with M-C-C's keybinding changed to "mail" which is on my keyboard and unused