Workaround: Button6 breaking all bindings



la 26.06.2008 20:19 Daniel Pfeiffer skribis:
la 23.06.2008 00:19 Daniel Pfeiffer skribis:
la 22.06.2008 23:15 Timo Korvola skribis:
Sawfish needs to be fixed to support extra mouse buttons without
messing with the modifier state (buttons after 5 do not have modifier
bits, Sawfish just pretends they do).
If group locking is represented as a modifier bit which coincides with the one used to represent mouse6, that would seem to be the cause.  But that would make sawfish useless to all users of multi-keyboard setups (physically or only logically mapped on the same one) so there should be tons of complaints, or don't you have users from far eastern and south eastern Europe?
As a workaround I fix those maps which cause a problem for me, at the end of my .sawfishrc:

...
     (setcdr l `((,(caar l) ,(lookup-event (concat "Button6-" name))) ,@(cdr l)))
...

Physically modifying the keymaps is flaky.  So I redid it with bind-keys, which apparently does something more:

;; Duplicate non-button keybindings with phony Button6 modifier, which SF assumes in XKB group 2
(mapc
 (lambda (keymap)
   (let ((l (cdr keymap))               ; skip 'keymap
         acc name)
     (while l
       (or (string-match "Button" (setq name (event-name (cdar l))))
         (setq acc `(,(concat "Button6-" name) ,(caar l) ,@acc)))
       (setq l (cdr l)))
     (apply bind-keys keymap acc)))
 `(,prompt-keymap ,global-keymap ,window-keymap))
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                    http://lernu.net  /  http://ikurso.net


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]