Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-07-31 09:37:35

truedays
Member
Registered: 2013-07-31
Posts: 6

MouseKey hotkey toggle (<Alt><numlock>)

Hi,

I'm trying to figure out a way to enable/disable via hotkey Mouse Emulation through the numpad. (Settings >> Accessibility | Mouse > Use Mouse emulation)

In Gnome2 you use to be able to toggle MouseKeys with Alt+NumLock. I would like to try to mimic this behavior in XFCE.

P.S.
Previous topic [solved] Mousekeys does not work in XFCE 4.10.0

Offline

#2 2013-07-31 13:02:01

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,143

Re: MouseKey hotkey toggle (<Alt><numlock>)

This seems to work. Create a script with the following content:

#!/bin/bash
[ $(xfconf-query -c accessibility -p /MouseKeys) == "false" ] \
	&& $(xfconf-query -c accessibility -p /MouseKeys -s true) \
	|| $(xfconf-query -c accessibility -p /MouseKeys -s false)

...make the script executable and assign it to the Alt+Numlock key combination.

Last edited by ToZ (2013-07-31 15:35:50)


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#3 2013-07-31 21:58:32

truedays
Member
Registered: 2013-07-31
Posts: 6

Re: MouseKey hotkey toggle (<Alt><numlock>)

This works, but only after I first enable settings / accessibility / Enable Mouse emulation.

Thank you!

Offline

#4 2013-07-31 22:46:29

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 3,143

Re: MouseKey hotkey toggle (<Alt><numlock>)

truedays wrote:

This works, but only after I first enable settings / accessibility / Enable Mouse emulation.

Thank you!

Sorry. Yes the xconf entry needs to exist prior to being able to toggle it.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#5 2013-07-31 22:57:35

truedays
Member
Registered: 2013-07-31
Posts: 6

Re: MouseKey hotkey toggle (<Alt><numlock>)

No problem. I figured it out and mentioned it so others wouldn't have any issue.

Thanks again!

Offline

Board footer

Powered by FluxBB