no.to...@gmail.com
unread,Jan 5, 2013, 2:11:16 PM1/5/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I want to be able to [like ETHOberon & linux:wily, which copied it], move the
mouse-pointer in the display, and press specific keys, to get corresponding
actions. How to 'capture' the word that the mouse is 'at' isn't obvious to me;
but the more trivial task of mapping a key to eg. left-mouse must first be done.
-> man xmodmap == ...
}client applications convert event keycodes into keysyms.
}Usually run from session startup script to configure the keyboard according
}to personal tastes.
}
}To reverse the button codes of a 3 button pointer:
-> xmodmap -e "pointer = 3 2 1"
== Warning: Only changing the first 3 of 32 buttons <- Wow!! applies to All X
So that confirms remapping of the mouse-buttons.
Considering that the keys and mouse-buttons are listed together, suggests
that they can be handled together and 'cross-mapped' eg.
-> less /usr/include/X11/keysymdef.h == ...
#define XK_Pointer_Button1 0xfee9
#define XK_Pause 0xff13 /* Pause, hold */
#define XK_Scroll_Lock 0xff14
#define XK_Sys_Req 0xff15
#define XK_Escape 0xff1b
#define XK_Delete 0xffff /* Delete, rubout */
....
#define XK_Pointer_Button1 0xfee9
#define XK_Pointer_Button2 0xfeea
#define XK_Pointer_Button3 0xfeeb
--------
From the man:
} Similarly, some keyboards have an Alt key but no Meta key. In that
} case the following may be useful:
} % xmodmap -e "keysym Alt_L = Meta_L Alt_L"
by direct substitution:-
-> xmodmap -e "XK_Scroll_Lock = XK_Pointer_Button1"
should <give mouse1 on Scroll_Lock>
Instead, I get:
xmodmap: unknown command on line commandline:1
xmodmap: 1 error encountered, aborting.
And tracing 'xmodmap' from `startx` finds all the alternate
xmodmap missing.
BTW the related `xev` is interesting, and also groups mouse
with keybrd, again suggesting that mapping between the 2
should be easy.
Perhaps this all depends on which WM is used? I prefer blackbox.
Apparently X is considered as being a mess by many authorities.
-> xmodmap -e "keysym XK_Scroll_Lock = XK_Pointer_Button1" ==
xmodmap: commandline:1: bad keysym target key symbol 'XK_Scroll_Lock'
xmodmap: 1 error encountered, aborting.
-> xmodmap -e "keysym XK_Delete = XK_Pointer_Button1" ==
xmodmap: commandline:1: bad keysym target key symbol 'XK_Delete'
xmodmap: 1 error encountered, aborting.
-> xmodmap -e "keysym XK_Scroll_Lock = keysym XK_Delete" ==
xmodmap: commandline:1: bad keysym target key symbol 'XK_Scroll_Lock'
xmodmap: 1 error encountered, aborting.
-> xmodmap -e "keysym XK_Scroll_Lock = keysym XK_Delete"
xmodmap: commandline:1: bad keysym target key symbol 'XK_Scroll_Lock'
xmodmap: 1 error encountered, aborting.
-> xmodmap -e "keysym Alt_L = Meta_L Alt_L" == OK: no error mesg
So it seems that keysym Alt_L and Meta_L Alt_L are 'known'
So, if I could find the 'table' perhaps I could see what/how to define stuff?
-> xmodmap -e "keysym Alt_L = XK_Pointer_Button1" ==
xmodmap: commandline:1: bad keysym name 'XK_Pointer_Button1' in keysym list
xmodmap: 1 error encountered, aborting.
Searching for "xmodmap", starting from`startx` -> xinit... FAILED.
How would you map a key to a mouse-button?
==TIA