- Control mouse with keyboard in ubuntu
- Control mouse with keyboard in Ubuntu
- How to control the mouse pointer via my keyboard?
- How can I configure «mousekeys»?
- Remapping both mouse and keyboard to a gamepad
- 1. Install xboxdrv 0.8.2 from Ubuntu Software Center.
- 2. Need to know the event of the gamepad:
- 3. Display names of every keys, axis, buttons of the gamepad.
- 4. Set the config file
- 5. Launch it
- CONCLUSION
- Control mouse with keyboard in Ubuntu
- 5 Answers 5
Control mouse with keyboard in ubuntu
Here I set gamepad buttons 2 for left mouse button and 3 for right mouse button: Note that value for REl_X and REL_Y seems to define the speed of the mouse, and by defining a negative value it invert the axis (see here for REL_Y) Keys / and * on the numpad select left mouse click and right mouse click respectively.
Control mouse with keyboard in Ubuntu
I’m looking for a program that I can use to control the mouse from the keyboard. I think a video can explain it much better than I could, so please check out Mouser from lifehacker.com:
Unfortunately, it’s only for Windows, but something like this would be the perfect solution. I found a lot of help on mapping keys to programs, but nothing about mapping keys to mouse control.
If you look at that HackaDay article, it says he created Mouser.exe after viewing a presentation from a guy at Google. Google’s known for its use of linux, right? One of the links from your HackaDay article took me here: http://www.semicomplete.com/projects/keynav/ And here is a demo of keynav in action
Just tested on Ubuntu 10.10 and it works fine. I had to install libxdo-dev before it would build (make), but then it ran fine. Note there’s no ‘make install’ target, so just copy the keynav binary it builds to someplace in your path (~/bin, /opt/bin, etc).
Doesn’t work awesome with dual monitors. Edit: NM. Split at least once, than use Shift+[hjkl] to move the divider around. That can jump you to the other screen.
It can help out partially . System -> Settings -> Assistive Technologies ; then Keyboard Accessibility , under » Mouse Buttons «
Also using Shortcuts may help you too.
another way is using ctrl-shift-numlock that is supposed to be the key combo that will let you move the Cursor With the Keyboard. But, I can’t very sure that it works, since my laptop doesn’t have a dedicated numlock key. you can control the mouse from keyboard. Keys / and * on the numpad select left mouse click and right mouse click respectively. Mouse click is done by 5 on the numpad.
In Ubuntu 11, Gnome I found this in System -> Preferences -> Keyboard and then Mouse Keys tab and check Pointer can be controlled using keypad .
To access System menu use ALT + F1 shortcut.
For Ubuntu users you can try:
- System-settings
- Universal Access
- Pointing and Clicking tab
- Switch off the key that says Mouse keys .
How to control the mouse pointer via my keyboard?, 8 If you go to «System Setting» -> «Universal Access» -> «Pointing and Clicking» and activate «Mouse Keys» you can use the numpad keys to move the mouse pointer. Share Improve this answer answered Nov 13, 2011 at 14:24 Florian Diesch 83k 17 217 213 Add a comment Your Answer Post Your Answer
How to control the mouse pointer via my keyboard?
How to control(or simulate) my mouse pointer movements using keyboard shortcuts (on Ubuntu 11.10).
If you go to «System Setting» -> «universal access» -> «Pointing and Clicking» and activate «Mouse Keys» you can use the numpad keys to move the mouse pointer.
Is it possible to use mouse gestures without pressing a key?, You can use EasyStroke using mouse buttons rather than keys. If you uncheck all of the modifier keys, you can use plain left or right button mouse gestures. Share. Improve this answer. answered Dec 3, 2010 at 4:55. Nerdfest. 4,528 3 26 29. Add a comment.
How can I configure «mousekeys»?
Under 11.04, the option to control the pointer with the numpad was set in the Hardware/Keyboard settings page.
How can I turn on mousekeys or configure them in newer releases?
In 11.10 and above you go to System Settings in the Power cog menu and select Universal Access .
Under the Pointing and clicking tab you will see a slider that lets you turn Mouse Keys on and off. The label says: Control the pointer using the keypad.
grahammechanical’s answer is good, but I want to talk about some extra features as I’ve dreamed to be a «keyboard geek» which turned out to be too extreme:
1.Killing mice, one at a time(replace mouse keys)
xdotool — command-line X11 automation tool(+keyborad custom shortcuts)
xdotool click 3(context menu) xdotool click 2(middle) xdotool click 1(left click)
2.replace mouse movement(use keyboard to move mouse pointer more accurate — need the support of «universal access -> Mouse Keys»)
xkbset — user preference utility for XKB extensions for X
-xkbset ma 60 10 10 5 2 xkbset ma 60 10 10 20 10
This procedure is the same from 11.10 to at least 14.04, and it is nicely documented on help.ubuntu.com. Because those instructions have been kept up to date, it’s likely that the documentation will also be extremely helpful for future versions of Ubuntu.
Here are the links for mousekeys in versions 12.04 through 14.04 — note that the url is identical with the exception of the version number:
Here are the 12.04 -based instructions from the help site.
- Click the icon at the very right of the menu bar and select System Settings .
- Click Universal Access .
- Select the Pointing and Clicking tab.
- Switch Mouse Keys on.
- Make sure that Num Lock is turned off. You will now be able to move the mouse pointer using the keypad.
For Unity, I found it easier to hit the Super , type in the first few letters of «universal», then skip to the third step given above («Select the Pointing and Clicking tab»).
This is reflected in the 14.04 documentation :
- Tap the Super key to open the Dash.
- Type Universal Access and press Enter to open the Universal Access settings.
- Press Tab once to select the Seeing tab.
- Press ← once to switch to the Pointing and Clicking tab.
- Press ↓ once to select the Mouse Keys switch then press Enter to switch it on.
- Make sure that Num Lock is turned off. You will now be able to move the mouse pointer using the keypad.
Can we move mouse cursor by keyboard command in, With Pgage Up and Page Down you can scroll within the page. To access the menu hold Alt, the underlined letters are the shortcut to activate the corresponding menu. For example Alt with F opens the file menu and then you can navigate the menu with the arrow keys.
Remapping both mouse and keyboard to a gamepad
Since Halloween, I have been really enjoying Frictional Games’ Amnesia on Ubuntu. My next goal is to get the other offerings they have.
Unfortunately, there is not a gamepad setting for this game (and many others out there). I know there is software like rejoystick that allows the mapping of keyboard keys to a gamepad. However, since this game incorporates the mouse, is there a solution to map both over?
Update: I have found on playdeb.net QJoypad. It allows the mapping of both keyboard and mouse. Unfortunately, I still seem to have trouble with the mouse when entering Amnesia.
Following Grumbel ‘s answer, I tried xboxdrv solution with the support of his link and specially this page:
1. Install xboxdrv 0.8.2 from Ubuntu Software Center.
Install also uinput and joydev if needed. I did it this way sudo modprobe uinput + sudo modprobe joydev
2. Need to know the event of the gamepad:
Launch udevadm monitor —udev and then plug the game pad :
$ udevadm monitor --udev monitor will print the received events for: UDEV - the event which udev sends out after rule processing UDEV [6722.377700] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1 (usb) UDEV [6722.383264] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0 (usb) UDEV [6722.383333] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/0003:046D:C218.0003 (hid) UDEV [6722.383389] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/0003:046D:C218.0003/hidraw/hidraw1 (hidraw) UDEV [6722.387123] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10 (input) UDEV [6722.399284] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10/event8 (input) UDEV [6722.412128] add /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10/js0 (input)
I conclude that my gamepad’s event is /dev/input/event8
3. Display names of every keys, axis, buttons of the gamepad.
The idea is to launch xboxdrv and test every buttons and note the result on paper.
$ sudo xboxdrv --evdev /dev/input/event8 --evdev-debug Your Xbox/Xbox360 controller should now be available as: /dev/input/js1 /dev/input/event9 Press Ctrl-c to quit, use '--silent' to suppress the event output EV_ABS ABS_X 128 EV_ABS ABS_Y 128 .
In my case the result is:
4. Set the config file
Create a xboxdrv-mouse.ini file to set X Y axis and Left and Right Mouse button.
Here I set gamepad buttons 2 for left mouse button and 3 for right mouse button:
[xboxdrv] evdev=/dev/input/event8 silent=true [evdev-absmap] ABS_X=x1 ABS_Y=y1 [ui-axismap] x1=REL_X:10 y1=REL_Y:-10 [evdev-keymap] BTN_THUMB=a BTN_THUMB2=b [ui-buttonmap] a=BTN_LEFT b=BTN_RIGHT # EOF #
Note that value for REl_X and REL_Y seems to define the speed of the mouse, and by defining a negative value it invert the axis (see here for REL_Y)
An other example with more button definition
[xboxdrv] evdev=/dev/input/event8 silent=true [evdev-absmap] ABS_X=x1 ABS_Y=y1 ABS_HAT0X=x2 ABS_HAT0Y=y2 [ui-axismap] x1=REL_X:10 y1=REL_Y:-10 x2=KEY_LEFT:KEY_RIGHT y2=KEY_DOWN:KEY_UP [evdev-keymap] BTN_TRIGGER=x BTN_TOP=y BTN_THUMB=a BTN_THUMB2=b BTN_PINKIE=rt BTN_BASE2=rb BTN_TOP2=lt BTN_BASE=lb BTN_BASE3=back BTN_BASE4=start [ui-buttonmap] x=KEY_KPENTER y=KEY_SPACE a=BTN_LEFT b=BTN_RIGHT rt=KEY_KP8 rb=KEY_KP2 lt=KEY_KP6 lb=KEY_KP4 back=KEY_LEFTSHIFT start=KEY_RIGHTCTRL # EOF #
5. Launch it
sudo xboxdrv --config xboxdrv-mouse.ini
To avoid launching it with sudo , create a udev rule.
CONCLUSION
It works fine, it’s the best solution for me.
The solution is QJoyPad. As I stated in my update on the question, it does allow the mapping of both keyboard and mouse.
Amnesia is a little bit of an oddball in the configuration because the game uses, according to their forum, relative mouse movements. The solution is launch the game via a terminal after typing in export SDL_VIDEO_X11_DGAMOUSE=0 . After doing so, my test with the mouse worked fine.
By the way, the controller I am using with QJoyPad is a Logitech Dual Action.
To map a gamepad to mouse, try js2mouse.
In Ubuntu 11.10, qjoypad doesn’t seem to work properly, because a left-click on its icon in the notification area triggers a right-click menu with no way to access setup. You can, however, use Rejoystick (also available in PlayDeb). The first time you run it (running rejoystick ) you assign keys to your gamepad’s buttons, then save. Next you run rejoystick -d and you won’t get a GUI, rejoystick is running in the background and will use your gamepad’s buttons for the assigned keys.
I would definitely recommend AntiMicro, which picks up from where the discontinued QJoyPad left off. I’m using it right now to play Civ V from my couch and am loving every minute of it. It was easy to setup and use (and yes, it lets you map both keyboard as well as mouse — including left/right wheel scrolling).
How can I configure my mouse side buttons to control, In the ~/.xbindkeysrc, add these lines: # Adjust volume with mouse buttons «xdotool key XF86AudioLowerVolume» b:8 «xdotool key XF86AudioRaiseVolume» b:9. Start xbindkeys. xbindkeys. The buttons will now adjust volume. In Startup Applications, add an entry to autostart xbindkeys on login: Name: xbindkeys.
Control mouse with keyboard in Ubuntu
I’m looking for a program that I can use to control the mouse from the keyboard. I think a video can explain it much better than I could, so please check out Mouser from lifehacker.com: http://lifehacker.com/212816/hack-attack-operate-your-mouse-with-your-keyboard Unfortunately, it’s only for Windows, but something like this would be the perfect solution. I found a lot of help on mapping keys to programs, but nothing about mapping keys to mouse control.
5 Answers 5
If you look at that HackaDay article, it says he created Mouser.exe after viewing a presentation from a guy at Google. Google’s known for its use of linux, right? One of the links from your HackaDay article took me here: http://www.semicomplete.com/projects/keynav/ And here is a demo of keynav in action
Just tested on Ubuntu 10.10 and it works fine. I had to install libxdo-dev before it would build (make), but then it ran fine. Note there’s no ‘make install’ target, so just copy the keynav binary it builds to someplace in your path (~/bin, /opt/bin, etc).
Doesn’t work awesome with dual monitors.Edit: NM. Split at least once, than use Shift+[hjkl] to move the divider around. That can jump you to the other screen.
keynav is great, I’ve been using it for years. I’d also like to point out warpd, which has a few more features. It’s currently only packaged for Arch, though, which is why I’m posting this as a comment instead of an answer.