4

There's an option for Ubuntu's mouse that says 'Show position of the mouse when the Control key is pressed.'. This function is required permanently enabled for a certain script I run, but on the other side it makes Blender 'Control' key not to work (as in Ctrl+Z, which is annoying) nor in some other apps (like the game Limbo). So, how can I solve this problem?

There are three solutions I can think of, but I don't know how to implement any of them.

  • Change the key being clicked. If I could show mouse position with, say, Tab, that'd be perfectly fine.
  • To show the mouse with a script. THIS would be the best actually (currently I'm using xte to emulate the Ctrl key pressing). Running something like show-mouse in a terminal would be great. Couldn't find anything through google though.
  • Make these programs to recognize the Control pressing apart of gnome/ubuntu. This is probably a bug so this should be the hardest way to solve. EDIT
  • There is another option worth considering, I can send a gnome notification so it's displayed when I touch the screen on the main screen instead of around the mouse. However, it displays for a really long time, which is a known bug. It's worth considering in case it is solved.

Thank you so much!

PS, the solutions here didn't work for me.

Ubuntu 12.04

1
  • I don't understand what you mean by "This function is required permanently enabled for a certain script I run". Could you elaborate? Just asking because you could use the Compiz Config Settings manager to enable the "show mouse" plugin and then get your script to use that...
    – Fabby
    Nov 19, 2014 at 2:11

1 Answer 1

0

You can use:

xdotool getmouselocation

to get the current mouse position. Then you can find ways to draw something at the mouse position.

Example usage using xwinwrap and ImageMagick, which displays 1.png for 3 seconds, but you may need to change some configurations of your window manager to make it work:

xwinwrap -g 100x100+$(xdotool getmouselocation|sed -r 's/^x:([0-9]+) y:([0-9]+) .*$/print \1-50;"+";\2-50/'|bc) -ni -a -st -sp -nf -o 0.5 -sh circle -- bash -c 'display -window $0 1.png;sleep 3s' WID

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .