You are not logged in.

#1 2010-11-18 04:28:54

Deimos
Member
From: PA
Registered: 2010-11-17
Posts: 6

Enabling back/forward mouse buttons in Dolphin

Hi,

I am new to Arch and am not completely sure yet on how to go about providing a solution that I found. I've searched the Wiki and the Forums for this issue and wasn't able to find a solution through any Arch site. I was, however, able to find a solution posted on the KDE forums and would like to share it with anyone who is suffering the same issue.

The original forum post can be found here: http://forum.kde.org/viewtopic.php?f=14&t=85430. I will summarize it here though for convenience.

First, you must install xautomation which can be downloaded at http://aur.archlinux.org/packages.php?ID=7312 and xbindkeys, which can be installed using Pacman.

Next, create a text file named .xbindkeysrc and save it to your home directory. The content of the file should be:

# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.0
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
# "command to start"
# associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#

# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events

# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.

#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable

# Examples of commands:

"xbindkeys_show" 
control+shift + q

# set directly keycode (here control + f with my keyboard)
"xterm"
c:41 + m:0x4

# specify a mouse button
"xterm"
control + b:2

#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
# alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a release event starts rxvt
#"rxvt"
# release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
# Control + b:2 + Release

# dolphin go back
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
b:9

# dolphin go forward
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
b:8


##################################
# End of xbindkeys configuration #
##################################

You then need to create an autostart entry in /home/user_name/.kde4/Autostart named xbindkeys.desktop containing the following code:

[Desktop Entry]
Comment[en_US]=
Comment=
Encoding=UTF-8
Exec=xbindkeys
GenericName[en_US]=
GenericName=
Icon=
MimeType=
Name[en_US]=
Name=
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-KDE-autostart-after=kdesktop

Now just reboot your computer and you should have back/forward mouse button functionality in Dolphin.

Offline

#2 2010-11-18 13:23:41

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: Enabling back/forward mouse buttons in Dolphin

Put it in the dolphin wiki smile


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#3 2010-11-18 14:26:55

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Enabling back/forward mouse buttons in Dolphin

ChoK wrote:

Put it in the dolphin wiki smile

This.

And, excellent job compiling the data. Just put it where it can do the most good.

Offline

#4 2010-11-18 15:22:55

Deimos
Member
From: PA
Registered: 2010-11-17
Posts: 6

Re: Enabling back/forward mouse buttons in Dolphin

ChoK wrote:

Put it in the dolphin wiki smile

Thanks for the advice. I will add it to the wiki when I get home tonight.

Offline

#5 2010-11-19 00:58:29

Deimos
Member
From: PA
Registered: 2010-11-17
Posts: 6

Re: Enabling back/forward mouse buttons in Dolphin

Just made my first Wiki post at https://wiki.archlinux.org/index.php/KD … e_managers. Can someone take a look and make sure that the info is posted in the right spot? I read through most of that page and the spot I picked seemed to make the most sense for what I was posting.
Thanks!

Offline

#6 2010-11-19 04:48:14

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Enabling back/forward mouse buttons in Dolphin

Does this work only for Dolphin?

Offline

#7 2010-11-19 16:28:11

Deimos
Member
From: PA
Registered: 2010-11-17
Posts: 6

Re: Enabling back/forward mouse buttons in Dolphin

I haven't tried it on anything else. What are you working with?

Offline

#8 2010-11-19 20:00:18

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Enabling back/forward mouse buttons in Dolphin

I wanted to try it with Qtfm.

Offline

#9 2010-11-19 21:35:24

Deimos
Member
From: PA
Registered: 2010-11-17
Posts: 6

Re: Enabling back/forward mouse buttons in Dolphin

Honestly, I'm not sure if it will work with Qtfm but worth a shot. If you do try it, I'd be interested to hear whether it worked or not.

Offline

#10 2010-11-19 23:57:52

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

Re: Enabling back/forward mouse buttons in Dolphin

anonymous_user wrote:

Does this work only for Dolphin?

No, it will work with any app that uses alt+left arrow and alt+right arrow to navigate as it just maps those button presses to the mouse side buttons.

Offline

#11 2010-11-20 01:58:57

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Enabling back/forward mouse buttons in Dolphin

Well qtfm does use those shortcuts so it should work. Thanks.

Last edited by anonymous_user (2010-11-20 01:59:59)

Offline

#12 2011-10-25 22:37:21

Occi
Member
From: Norway
Registered: 2011-09-18
Posts: 24
Website

Re: Enabling back/forward mouse buttons in Dolphin

I tried this just now with KDE 4.7 and I get this errormessage:
Installed the needed libraries/programs through the official packes instead of the AUR, but I guess the script is outdated or something.
Does anyone have a fix?

errormessage

Offline

#13 2012-02-11 19:47:55

catlover2
Member
From: From: From: From:
Registered: 2011-12-25
Posts: 11

Re: Enabling back/forward mouse buttons in Dolphin

This works fine with KDE 4.8.00, Arch x86_64.

xautomation has apparently been moved to the community repository from the AUR since the OP posted.


AMD Athlon II x4 640 - ASUS M4A88T-V EVO/USB3 - 12GBs RAM - XFX ATI Radeon HD 5670 1GB w/21.5"  Monitor - Assorted HDDs - Mushkin Enhanced Chronos 120Gb SSD - ArchLinux x64

Offline

#14 2013-08-07 14:47:53

BertiBoeller
Member
Registered: 2009-01-19
Posts: 58

Re: Enabling back/forward mouse buttons in Dolphin

I know this thread is really old but I got the mouse buttons working using this solution (I have a 9 button mouse):
Firs make sure you have xmodmap installed on your system:

# pacman -S xorg-xmodmap

Then create the following shell script: ~/.kde4/Autostart/xmodmap.sh

#!/bin/bash
xbindkeys -e "pointer = 1 2 3 4 5 6 7 8 9"

then make the script executable

$ chmod +x ~/.kde4/Autostart/xmodmap.sh

Restart KDE and hopefully the forward and backward mouse buttons should be working. smile

Offline

Board footer

Powered by FluxBB