You are not logged in.

#1 2010-07-21 06:59:24

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

xbindkeys - how to emulate a key press?

Hello!


In kde-dolphin and pcmanfm my "goleft/goright" mousebuttons (button 8 and 9) dont work.

I read about xbindkeys

http://hanschen.org/2009/10/13/mouse-sh … xbindkeys/


There is written that I have to do this

# Back
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
  b:6


But where can I find this "xte" package?

I do not have it on my computer!

thank you!

Offline

#2 2010-07-21 07:14:57

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: xbindkeys - how to emulate a key press?

I use:

# pacman -S xbindkeys xvkbd xev
# Use xev to find correct mouse button numbers.
"/usr/bin/xvkbd -text '\[Prior]'"
  b:8

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

Offline

#3 2010-07-21 08:17:33

SteveK
Member
Registered: 2010-06-11
Posts: 80

Re: xbindkeys - how to emulate a key press?

xte is part of the xautomation package which is in aur.

Offline

#4 2010-07-21 08:28:20

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

Re: xbindkeys - how to emulate a key press?

I use xdotool (it seemed a bit lighter than xvkbd). it is in [community]


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

Offline

#5 2010-07-21 09:08:52

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: xbindkeys - how to emulate a key press?

Thank you all it works now!

I was missing the xautomation package smile

But I will have a look at xdotool

Thanks!

Offline

#6 2019-01-25 06:46:06

fohrums
Member
Registered: 2014-08-07
Posts: 2

Re: xbindkeys - how to emulate a key press?

REFERENCE:
https://github.com/koldkaching/semicomp … -457454857

PACKAGES USED:
xbindkeys defines hotkeys in ~/.xbindkeysrc
xdotool outputs valid combination hotkey presses which includes modifiers
xev outputs valid individual keypresses

EXAMPLE OF XKEYBINDS ASSIGNING HOTKEY(S) FOR A KEYPRESS:

$ vim ~/.xbindkeysrc

"sleep 0.2 && xdotool key (xev -event keyboard)"
  m:0x19 + c:57
  (xbindkeys -m)
$ vim ~/.xbindkeysrc

"sleep 0.2 && xdotool key Control_L+Next"
  m:0x19 + c:57
  Shift+Alt+Mod2 + n

Only problem is that for creating hotkey for keypresses you have to include sleep to not conflict with what's being pressed down simultaneously when initiating a defined hotkey. This won't be a problem if you're creating hotkeys that are application oriented demonstrated below.

EXAMPLE OF XKEYBINDS ASSIGNING HOTKEY(S) FOR APPLICATION:

$ vim ~/.xbindkeysrc

"xfce4-terminal"
  m:0x1c + c:28
  Control+Alt+Mod2 + t

Offline

#7 2019-01-25 09:58:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: xbindkeys - how to emulate a key press?

Thanks for sharing, however please check the dates, the thread is 9 years old and solved.

https://wiki.archlinux.org/index.php/Co … bumping%22

Closing.

Offline

Board footer

Powered by FluxBB