#1 Le 04/08/2016, à 15:54
- CasseTaTélé_isback
[Résolu] Configurer les boutons de ma souris sous 16.04
Bonjour,
Je cherche à configurer ma souris logitech MX révolution sous ubuntu 16.04.
La page de documentation est complètement obsolète :
https://doc.ubuntu-fr.org/souris_logitech
Il n'y a plus de fichier /etc/X11/xorg.conf (qui marchait pourtant bien !)
Le logiciel propriétaire logitech est aussi obsolète : http://www.hidpoint.com/hidpoint
il s’arrête à la version ubuntu 10.10
L'instalation de btnx plante ...
Comment associer des actions à mes boutons de souris ?
De manière générale, si vous avez des souris ou dispositifs multi-boutons, comment faites-vous pour leur associer des actions ?
---
Edit: j'ai trouvé enfin la solution en fouillant la doc, je vous la livre si ça peut servir ...
J'ai installé xbindkeys,xev et xte (xbindkeys-config n'est pas utile)
sudo apt install xautomation xbindkeys
Puis avec xev j'ai repéré les boutons de ma souris que je voulais affecter à une action:
Bouton gauche : 1
Bouton central : 2
Bouton droit : 3
Molette haut : 4
Molette bas : 5
Molette gauche : 6
Molette droite : 7
Arrière : 8
Avant : 9
Molette coté avant : 13
Molette coté arrière : 15
Molette coté clic : 17
----------------------------------------------------------------------
Find ! ????
1 appui ----------------------------------------------------------------------
FocusIn event, serial 38, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 38, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 38, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
2 appui ----------------------------------------------------------------------
FocusIn event, serial 40, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 40, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 40, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 40, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
3 appui ----------------------------------------------------------------------
FocusIn event, serial 41, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 41, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 41, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 41, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
J'ai généré le fichier de configuration xbindkeysrc :
xbindkeys --defaults > ~/.xbindkeysrc
Puis je l'ai édité en rajoutant ces lignes :
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.6
#
# Workspace Left
"xte 'keydown Control_L' 'keydown Alt_L' 'key Left' 'keyup Alt_L' 'keyup Control_L'"
b:6
# Workspace Right
"xte 'keydown Control_L' 'keydown Alt_L' 'key Right' 'keyup Alt_L' 'keyup Control_L'"
b:7
# VLC arrière
"xte 'keydown Control_L' 'key Left' 'keyup Control_L'"
b:8
# VLC avant
"xte 'keydown Control_L' 'key Right' 'keyup Control_L'"
b:9
# VLC suivant
"xte 'key n'"
b:13
# VLC précédant
"xte 'key p'"
b:15
# Espace
"xte 'key space'"
b:17
# 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
##################################
# End of xbindkeys configuration #
##################################
(xte: sert à simuler les touches du clavier et b:numéro du bouton de souris)
Puis on relance xbindkeys et ça marche !!!
Liens utiles:
doc de XBindKeys
[Howto] Remapping buttons with xbindkeys and xte
MAPPING YOUR MOUSE BUTTONS IN LINUX
Bind keys with xbindkeys
Dernière modification par CasseTaTélé_isback (Le 27/08/2016, à 16:34)
Ubuntu 20.04
Hors ligne
#2 Le 27/08/2016, à 16:36
- CasseTaTélé_isback
Re : [Résolu] Configurer les boutons de ma souris sous 16.04
Par contre un des boutons de ma souris (find) renvoie :
1 appui ----------------------------------------------------------------------
FocusIn event, serial 38, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 38, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 38, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
2 appui ----------------------------------------------------------------------
FocusIn event, serial 40, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 40, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 40, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 40, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
3 appui ----------------------------------------------------------------------
FocusIn event, serial 41, synthetic NO, window 0x4a00001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 41, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0
FocusOut event, serial 41, synthetic NO, window 0x4a00001,
mode NotifyUngrab, detail NotifyPointer
MappingNotify event, serial 41, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
Je ne sais pas à quoi ça correspond ...
Je sais pas comment l'assigner avec xbindkey du coup ...
Ubuntu 20.04
Hors ligne
#3 Le 06/10/2016, à 21:27
- CasseTaTélé_isback
Re : [Résolu] Configurer les boutons de ma souris sous 16.04
Pour le bouton "find" j'ai réussi à lui assigner la simulation de la barre espace avec un raccourcis personnalisé (via l'interface de configuration 'clavier') qui lance la commande :
xte 'key space'
avec le bouton "search"
Par contre, le click sur la molette fait basculer le mode de défilement libre/crénelé mais le copy/paste ne marche plus ...
[Edit]
Finalement, pour rétablir le copy/past de la sélection j'ai installé xdotool et affecté la commande
"xdotool click 2"
au bouton "search"
doc: http://unix.stackexchange.com/questions … h-keyboard
Dernière modification par CasseTaTélé_isback (Le 28/10/2016, à 17:01)
Ubuntu 20.04
Hors ligne