You are not logged in.
Pages: 1
Hello,
I am new to xfce, I just switched from window maker after 12 years and I am trying to setup a logitech mouse to use buttons 8 and 9 for window and workspace switching. I am running xfce-4.10 and slackware 14.0.
the original idea came from http://hanschen.org/2009/10/13/mouse-sh … xbindkeys/
Following the first example I was only able to bind the mouse button to alt tab using .xbindkeysrc values of
# cycle windows
"xte 'usleep 80000' 'keydown Alt_L' 'key Tab' 'keyup Alt_L'"
m:0x0 + b:9
the usleep is required because xfce has an issue with focusing
http://ubuntuforums.org/archive/index.p … 19632.html
This only allowed for switching between the first and second windows I wanted to be able to switch to all open windows, and since I am unable to use my mouse to select the program using the window cycle dialog I tried these instructions
http://www.linuxquestions.org/questions … 175428297/
The workspace switching works as expected, when button 9 is pushed the scroll button can be use to switch switch workspaces without issue, but the cycling of the windows does not work. Other guides required a sleep requirement or wait time
I can run the command "xdotool keydown alt key Tab keyup alt" from the command line and it works but it does not work for the mouse
the xbindkeysrc is
;; This configuration is guile based.
;; http://www.gnu.org/software/guile/guile.html
;; This config script is supposed to live in the homedirectory.
;; Awesome script created by Zero Angel
;; This couldnt have been possible without seeing Vee Lee's configuration file
;; You'll need xdotool and xbindkeys with -guile support compiled for this to work (The Ubuntu xbindkeys will have this support by default).
;; It assigns keybindings to the scroll wheel on the fly when mouse modifier keys are pressed. Useful for mice with lots of buttons!
;; v1.0 -- Shoulder button + scrollwheel bindings
;; v1.1 -- Fixes some 'stuckness' problems with the modifer keys (ctrl, alt, shift)
;; v1.2 -- Can trigger events properly if the modifier button is simply pressed and released by itself. Forcefully clears modifier keys when the shoulder buttons are depressed.
;; v1.3 -- Edited by Joseph Hernandez to use Left and Right instead of up and down as workspace actions
(define actionperformed 0)
(define (first-binding)
"First binding"
;; Logitech Front Shoulder Button
(xbindkey-function '("b:9") b9-second-binding)
;; Logitech Rear Shoulder Button
(xbindkey-function '("b:8") b8-second-binding)
)
(define (reset-first-binding)
"reset first binding"
(ungrab-all-keys)
(remove-all-keys)
;; Set Action Performed state back to 0
(set! actionperformed 0)
;; Forcefully release all modifier keys!
(run-command "xdotool keyup ctrl keyup alt keyup shift keyup super&")
(first-binding)
(grab-all-keys))
(define (b9-second-binding)
"Front Shoulder Button Extra Functions"
(ungrab-all-keys)
(remove-all-keys)
;; Scroll Up
(xbindkey-function '("b:4")
(lambda ()
;; Emulate Ctrl+Alt+Left (Workspace Left)
(run-command "xdotool keydown ctrl keydown alt key Left keyup ctrl keyup alt&")
(set! actionperformed 1)
))
;; Scroll Down
(xbindkey-function '("b:5")
(lambda ()
;; Emulate Ctrl+Alt+Right (Workspace Right)
(run-command "xdotool keydown ctrl keydown alt key Right keyup ctrl keyup alt&")
(set! actionperformed 1)
))
(xbindkey-function '(release "b:9") (lambda ()
;; Perform Action if Button 8 is pressed and released by itself
(if (= actionperformed 0) (run-command "zenity --info --title=hi --text=Button9ReleaseEvent &"))
(reset-first-binding)))
(grab-all-keys))
(define (b8-second-binding)
"Rear Shoulder Button Extra Functions"
(ungrab-all-keys)
(remove-all-keys)
;; Scroll Up
(xbindkey-function '("b:4")
(lambda ()
;; Emulate Alt+Shift+Tab (previous window)
(run-command "xdotool keydown alt keydown shift key Tab keyup alt keyup shift")
(set! actionperformed 1)
))
;; Scroll Down
(xbindkey-function '("b:5")
(lambda ()
;; Emulate Alt+Tab (next window)
(run-command "xdotool keydown alt key Tab keyup alt")
(set! actionperformed 1)
))
(xbindkey-function '(release "b:8") (lambda ()
;; Perform Action if Button 8 is pressed and released by itself
(if (= actionperformed 0) (run-command "zenity --info --title=hi --text=Button8ReleaseEvent &"))
(reset-first-binding)
))
(grab-all-keys)
)
;; (debug)
(first-binding)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; End of xbindkeys configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Offline
bump
Offline
Pages: 1
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 534.7 KiB (Peak: 538.85 KiB) ]