DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th April 2017
GarryR GarryR is offline
Real Name: Garry Ricketson
Shell Scout
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 100
Default (solved)Mouse movement with key board keys

I have been searching, but all I find is results for ubuntu and linux,..

Any way, lets' say for example , something goes wrong with my mouse, and it no longer works, mechanicly,...for me it is several hours to go to the city, so to just run down to the
store and buy a new mouse is not practical.
Or, maybe I simply do not want to use the mouse,.. Any way,
I am using Open Box, as my WM,
Is there any way to enable the number key pad, or use the arrow keys to move the mouse cursor, and other key's to "click" ?
Hope this makes sense,..
Thanks
__________________
More screen shots here: My OpenBsd screens

My best friends are parrots

Last edited by GarryR; 19th April 2017 at 02:47 AM. Reason: label as solved
Reply With Quote
  #2   (View Single Post)  
Old 18th April 2017
fvgit's Avatar
fvgit fvgit is offline
Fdisk Soldier
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("SGVyZSBiZSBkcmFnb25zC")'
Posts: 70
Default

You can do this with xkbset (in ports/x11):

Quote:
This program can be used to set various options available in the XKB
extensions. This includes such things as mousekeys where one can use
the numeric pad keys to move the mouse;
On my macbook which has no number key pad I remapped two keys with .Xmodmap:

Code:
keycode 116 = Pointer_Button2
keycode 113 = Pointer_Button3
and activate the mousekeys functionality in ~/.xinitrc:
Code:
xkbset m
xkbset exp =m
The second line with 'exp' keeps the mousekeys setting active, otherwise it deactivates itself after a default timeout. With a regular full keyboard you can probably skip the .Xmodmap thing, I think. xkbset m should set your number key pad to full mousekeys setting IIRC.

My Xmodmap example above gives me middle and right mouse click on the right cmd key and the option/alt key next to it.


Silly me! You can also do it with the default install:

Did a quick'n'dirty test on my pc, for instance:
Code:
setxkbmap -option grp:ctrl_shift_toggle "de,us"
setxkbmap -option keypad:pointerkeys
After that Ctrl+shift toggles between DE & US layouts
and Shift+Num activates the pointerkeys on the keypad.

You can find the key actions described in:
/usr/X11R6/share/X11/xkb/compat/mousekeys

Last edited by fvgit; 18th April 2017 at 11:55 PM. Reason: Added the bit about setxkbmap -- no xkbset required
Reply With Quote
  #3   (View Single Post)  
Old 19th April 2017
GarryR GarryR is offline
Real Name: Garry Ricketson
Shell Scout
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 100
Default

Thanks a lot, I see it in the manual now as well,
Code:
man setxkbmap


It seems to work, -
__________________
More screen shots here: My OpenBsd screens

My best friends are parrots

Last edited by GarryR; 19th April 2017 at 01:01 AM. Reason: add comment
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a NIC into cramped micro itx board for firewall azarian OpenBSD General 3 21st May 2015 12:26 AM
PC Engines Alix 2d13 board J65nko General Hardware 3 20th January 2013 12:43 AM
Low power board supporting ECC memory jony General Hardware 15 29th June 2010 02:01 PM
open bsd 4.3 on intel board ddocksta OpenBSD General 11 25th September 2008 06:50 AM
which main board for freebsd 7? easd FreeBSD General 2 6th June 2008 01:13 PM


All times are GMT. The time now is 10:02 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick