You are not logged in.

#1 2010-01-28 11:46:43

3ner
Member
Registered: 2007-12-29
Posts: 12

Bind Mod4 key to mousebutton 9

Hi,

I want to map the Mod4 modifier (aka as Super or Windowskey) to the button 9 on my mouse.
Problems so far are, xmodmap needs a keycode or keysym, which the button doesn't have or xev doesn't show.
xbindkeys can use the button, but (afaik) only send a command when the key is pressed, which works for most things but modifier keys.

My next idea is: most apps do a "history forward" when i press that button. So either it is convention that button 9 should do that "forward" or something (maybe the driver itself?) maps this to button 9. If the latter is true, I could be able to change it to mod4, but i don't know much about it.

Or is a nice app out there I don't know about? Any input for my issue is welcome.

Offline

#2 2010-01-28 23:28:06

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Bind Mod4 key to mousebutton 9

in .xbindkeysrc:

"/usr/bin/xvkbd -text '\[XF86Forward]'"
    b:9

you probably can't bind to mod4 because X doesn't recognise it directly. also, you'll have to install xvkbd

Last edited by PirateJonno (2010-01-28 23:28:42)


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#3 2010-01-29 01:45:03

3ner
Member
Registered: 2007-12-29
Posts: 12

Re: Bind Mod4 key to mousebutton 9

Although your post had no new info for me, I recognised that I was wrong and xbindkeys can indeed send a command on a release event. Now I only need a program to "press" and "release" a Mod4. xmacro looks promising on first sight, I'm going to look at it tomorrow I think.

Offline

#4 2010-01-29 05:25:41

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Bind Mod4 key to mousebutton 9

oh right, sorry i misread your post. i don't know any more than that though


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

#5 2010-01-29 13:49:17

3ner
Member
Registered: 2007-12-29
Posts: 12

Re: Bind Mod4 key to mousebutton 9

what i have so far:
in .xbindkeysrc

"xvkbd -text 'foo'"
  b:9
"xvkbd -text 'bar'"
  release + b:9

does what i expect it to do (print foo on keypress and bar on keyrelease)

So what i need is a program/script to switch the mod4...
xmacroplay seems buggy here, creating infinite keypress and keyrelease events.
xdotool seems fine for

xdotool keydown a

but

xdotool keydown super|Super_L|shift

and similar don't do what I want.

Offline

#6 2011-06-10 16:19:06

StarGater93
Member
Registered: 2010-07-15
Posts: 2

Re: Bind Mod4 key to mousebutton 9

Did anything come out of this? Modifier keys would be far more useful than stupid back/forward buttons...

Offline

#7 2013-04-29 07:26:22

tipswell
Member
Registered: 2013-04-29
Posts: 2

Re: Bind Mod4 key to mousebutton 9

Hey.
I had installed xdotool in my Fedora 15, but i am unable to create key events. i am very new for that, so can anyone tll me how can i configur it and how can i get input of keyboard keys from Windows Os to My Fedora 15.

Thanks

Offline

#8 2013-04-29 07:32:35

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,825
Website

Re: Bind Mod4 key to mousebutton 9

I've just closed your thread on this topic and explained that these boards are for the support of Arch.

Let me explain it more clearly...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB