1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 15:25:42 +02:00

core: add modifiers control/alt ("ctrl" and "alt") for mouse events

This commit is contained in:
Sebastien Helleu
2011-10-05 18:15:28 +02:00
parent 971e464e86
commit b9dd668d90
6 changed files with 275 additions and 117 deletions
+3
View File
@@ -1,7 +1,10 @@
[replacements]
@k\(C-\)=<span class="key ctrl">Ctrl</span><span class="keyplus">+</span>
@k\(-C-\)=<span class="key ctrl">Ctrl</span>
@k\(A-\)=<span class="key alt">Alt</span><span class="keyplus">+</span>
@k\(-A-\)=<span class="key alt">Alt</span>
@k\(S-\)=<span class="key shift">Shift</span><span class="keyplus">+</span>
@k\(-S-\)=<span class="key shift">Shift</span>
@k\(l\)=<span class="key">l</span><span class="keyplus"> (L)</span>
@k\(([A-Za-z0-9_&\=])\)=<span class="key">\1</span>
@k\(([a-z0-9_&\=][^)]*)\)=<span class="key">\1</span>
+55 -19
View File
@@ -659,35 +659,71 @@ WeeChat definiert sind (siehe <<key_bindings_mouse_context,Tasten für "mouse"-K
Man kann mit dem Befehl `/key` im Kontext "mouse" aber auch eigene Befehle zuweisen
und löschen (für die Syntax, siehe <<command_weechat_key,/key Befehl>>).
Auflistung von Events die unterstützt werden:
// TRANSLATION MISSING
Event name consists of a modifier (optional), a button/wheel name and a gesture
(optional). Different elements are separated by "-".
[width="80%",cols="3m,4",options="header"]
// TRANSLATION MISSING
List of modifiers:
[width="50%",cols="3m,4",options="header"]
|========================================
| Event | Beschreibung
| button1 | linker Mausknopf wird gedrückt
| button2 | rechter Mausknopf wird gedrückt
| button3 | mittlerer Mausknopf wird gedrückt (häufig der Druck auf das Mausrad)
| button4 ... button9 | ein zusätzlicher Mausknopf wird gedrückt
| wheelup | Mausrad wird nach oben gescrollt
| wheeldown | Mausrad wird nach unten gescrollt
| buttonX-gesture-up ^(1)^ | Mausgeste mit einer Länge von 3 bis 19 Zeichen
| buttonX-gesture-up-long ^(1)^ | Mausgeste mit einer Länge von 20 und mehr Zeichen
| buttonX-gesture-down ^(1)^ | Mausgeste mit einer Länge von 3 bis 19 Zeichen
| buttonX-gesture-down-long ^(1)^ | Mausgeste mit einer Länge von 20 und mehr Zeichen
| buttonX-gesture-left ^(1)^ | Mausgeste mit einer Länge von 3 bis 39 Zeichen
| buttonX-gesture-left-long ^(1)^ | Mausgeste mit einer Länge von 40 und mehr Zeichen
| buttonX-gesture-right ^(1)^ | Mausgeste mit einer Länge von 3 bis 39 Zeichen
| buttonX-gesture-right-long ^(1)^ | Mausgeste mit einer Länge von 40 und mehr Zeichen
| Modifier | Description
| ctrl | key @k(-C-)
| alt | key @k(-A-)
| ctrl-alt | keys @k(-C-) and @k(-A-)
|========================================
[NOTE]
^(1)^ "X" muss durch die Nummer des Mausknopfes ersetzt werden (1 bis 9) die für die Mausgeste genutzt werden soll.
// TRANSLATION MISSING
List of buttons/wheel:
[width="50%",cols="3m,4",options="header"]
|========================================
| Button/wheel | Description
| button1 | linker Mausknopf wird gedrückt
| button2 | rechter Mausknopf wird gedrückt
| button3 | mittlerer Mausknopf wird gedrückt (häufig der Druck auf das Mausrad)
| button4 ... button9 | ein zusätzlicher Mausknopf wird gedrückt
| wheelup | Mausrad wird nach oben gescrollt
| wheeldown | Mausrad wird nach unten gescrollt
|========================================
// TRANSLATION MISSING
List of gestures (only for buttons, not wheel):
[width="50%",cols="3m,4",options="header"]
|========================================
| Gesture | Distance
| gesture-up | 3 ... 19
| gesture-up-long | ≥ 20
| gesture-down | 3 ... 19
| gesture-down-long | ≥ 20
| gesture-left | 3 ... 39
| gesture-left-long | ≥ 40
| gesture-right | 3 ... 39
| gesture-right-long | ≥ 40
|========================================
// TRANSLATION MISSING
Example of events:
* `button1`
* `ctrl-button1`
* `button1-gesture-right`
* `alt-button2-gesture-down-long`
* `wheelup`
* `ctrl-alt-wheeldown`
[TIP]
Wird eine Funktion im "mouse"-Kontext hinzufügt ist es möglich mehrere Events mittels
`*` abzufangen. Zum Beispiel: `button1-gesture-*` fängt alle Mausgesten ab, die mit
der linken Maustaste eingeleitet werden.
// TRANSLATION MISSING
[TIP]
You can find an event name with command `/input grab_mouse` then doing event
with mouse. This will insert event name on command line.
[[command_line]]
Befehlszeile
~~~~~~~~~~~~
+50 -19
View File
@@ -658,35 +658,66 @@ Many default mouse events are already defined by WeeChat (see
You can change or add bindings with the command `/key` using context "mouse"
(for syntax, see <<command_weechat_key,command /key>>).
List of events supported:
Event name consists of a modifier (optional), a button/wheel name and a gesture
(optional). Different elements are separated by "-".
[width="80%",cols="3m,4",options="header"]
List of modifiers:
[width="50%",cols="3m,4",options="header"]
|========================================
| Event | Description
| button1 | click on left button
| button2 | click on right button
| button3 | click on middle button (often click on wheel)
| button4 ... button9 | click on extra buttons
| wheelup | wheel (up)
| wheeldown | wheel (down)
| buttonX-gesture-up ^(1)^ | gesture with distance between 3 and 19
| buttonX-gesture-up-long ^(1)^ | gesture with distance greater than or equal to 20
| buttonX-gesture-down ^(1)^ | gesture with distance between 3 and 19
| buttonX-gesture-down-long ^(1)^ | gesture with distance greater than or equal to 20
| buttonX-gesture-left ^(1)^ | gesture with distance between 3 and 39
| buttonX-gesture-left-long ^(1)^ | gesture with distance greater than or equal to 40
| buttonX-gesture-right ^(1)^ | gesture with distance between 3 and 39
| buttonX-gesture-right-long ^(1)^ | gesture with distance greater than or equal to 40
| Modifier | Description
| ctrl | key @k(-C-)
| alt | key @k(-A-)
| ctrl-alt | keys @k(-C-) and @k(-A-)
|========================================
[NOTE]
^(1)^ "X" is number of button used in gesture (1 to 9).
List of buttons/wheel:
[width="50%",cols="3m,4",options="header"]
|========================================
| Button/wheel | Description
| button1 | click on left button
| button2 | click on right button
| button3 | click on middle button (often click on wheel)
| button4 ... button9 | click on extra buttons
| wheelup | wheel (up)
| wheeldown | wheel (down)
|========================================
List of gestures (only for buttons, not wheel):
[width="50%",cols="3m,4",options="header"]
|========================================
| Gesture | Distance
| gesture-up | 3 ... 19
| gesture-up-long | ≥ 20
| gesture-down | 3 ... 19
| gesture-down-long | ≥ 20
| gesture-left | 3 ... 39
| gesture-left-long | ≥ 40
| gesture-right | 3 ... 39
| gesture-right-long | ≥ 40
|========================================
Example of events:
* `button1`
* `ctrl-button1`
* `button1-gesture-right`
* `alt-button2-gesture-down-long`
* `wheelup`
* `ctrl-alt-wheeldown`
* ...
[TIP]
When binding a key in context "mouse", it's possible to match many events using
`*` at beginning or end of name, for example `button1-gesture-*` will match any
gesture made using left button.
[TIP]
You can find an event name with command `/input grab_mouse` then doing event
with mouse. This will insert event name on command line.
[[command_line]]
Command line
~~~~~~~~~~~~
+51 -19
View File
@@ -674,29 +674,56 @@ Vous pouvez modifier ou ajouter des associations avec la commande `/key` en
utilisant le contexte "mouse" (pour la syntaxe voir
<<command_weechat_key,la commande /key>>).
Liste des évènements supportés :
Un nom d'évènement consiste en un modifieur (facultatif), un bouton/roulette et
un geste (facultatif). Les différents éléments sont séparés par "-".
[width="80%",cols="3m,4",options="header"]
Liste des modifieurs :
[width="50%",cols="3m,4",options="header"]
|========================================
| Evènement | Description
| button1 | clic sur le bouton gauche
| button2 | clic sur le bouton droit
| button3 | clic sur le bouton du milieu (souvent clic sur la roulette)
| button4 ... button9 | clic sur un bouton additionnel
| wheelup | roulette (haut)
| wheeldown | roulette (bas)
| buttonX-gesture-up ^(1)^ | geste avec distance entre 3 et 19
| buttonX-gesture-up-long ^(1)^ | geste avec distance supérieure ou égale à 20
| buttonX-gesture-down ^(1)^ | geste avec distance entre 3 et 19
| buttonX-gesture-down-long ^(1)^ | geste avec distance supérieure ou égale à 20
| buttonX-gesture-left ^(1)^ | geste avec distance entre 3 et 39
| buttonX-gesture-left-long ^(1)^ | geste avec distance supérieure ou égale à 40
| buttonX-gesture-right ^(1)^ | geste avec distance entre 3 et 39
| buttonX-gesture-right-long ^(1)^ | geste avec distance supérieure ou égale à 40
| Modifieur | Description
| ctrl | touche @k(-C-)
| alt | touche @k(-A-)
| ctrl-alt | touches @k(-C-) et @k(-A-)
|========================================
[NOTE]
^(1)^ "X" est le numéro du bouton utilisé pour le geste (1 à 9).
Liste des boutons/roulette :
[width="50%",cols="3m,4",options="header"]
|========================================
| Bouton/roulette | Description
| button1 | clic sur le bouton gauche
| button2 | clic sur le bouton droit
| button3 | clic sur le bouton du milieu (souvent clic sur la roulette)
| button4 ... button9 | clic sur un bouton additionnel
| wheelup | roulette (haut)
| wheeldown | roulette (bas)
|========================================
Liste des gestes (seulement pour les boutons, pas la roulette) :
[width="50%",cols="3m,4",options="header"]
|========================================
| Geste | Distance
| gesture-up | 3 ... 19
| gesture-up-long | ≥ 20
| gesture-down | 3 ... 19
| gesture-down-long | ≥ 20
| gesture-left | 3 ... 39
| gesture-left-long | ≥ 40
| gesture-right | 3 ... 39
| gesture-right-long | ≥ 40
|========================================
Exemple d'évènements :
* `button1`
* `ctrl-button1`
* `button1-gesture-right`
* `alt-button2-gesture-down-long`
* `wheelup`
* `ctrl-alt-wheeldown`
* ...
[TIP]
Lors de l'association d'une touche dans le contexte "mouse", il est possible
@@ -704,6 +731,11 @@ d'adresser plusieurs évènements en utilisant `*` au début ou la fin du nom,
par exemple `button1-gesture-*` qui correspond à n'importe quel geste effectué
avec le bouton gauche.
[TIP]
Vous pouvez trouver le nom de l'évènement avec la commande `/input grab_mouse`
puis en faisant l'action avec la souris. Cela insèrera le nom de l'évènement
sur la ligne de commande.
[[command_line]]
Ligne de commande
~~~~~~~~~~~~~~~~~
+56 -19
View File
@@ -669,35 +669,72 @@ Molti eventi del mouse predefiniti sono già definiti da WeeChat (consultare
È possibile cambiare o aggiungere combinazioni con il comando `/key` usando il
contesto "mouse" (per la sintassi, consultare <<command_weechat_key,comando /key>>).
List of events supported:
// TRANSLATION MISSING
Event name consists of a modifier (optional), a button/wheel name and a gesture
(optional). Different elements are separated by "-".
[width="80%",cols="3m,4",options="header"]
// TRANSLATION MISSING
List of modifiers:
[width="50%",cols="3m,4",options="header"]
|========================================
| Evento | Descrizione
| button1 | click sul tasto sinistro
| button2 | click sul tasto destro
| button3 | click sul tasto centrale (spesso click sulla rotellina)
| button4 ... button9 | click sui pulsanti extra
| wheelup | rotellina (su)
| wheeldown | rotellina (giù)
| buttonX-gesture-up ^(1)^ | azione con distanza tra 3 and 19
| buttonX-gesture-up-long ^(1)^ | azione con distanza maggiore o uguale a 20
| buttonX-gesture-down ^(1)^ | azione con distanza tra 3 e 19
| buttonX-gesture-down-long ^(1)^ | azione con distanza maggiore o uguale a 20
| buttonX-gesture-left ^(1)^ | azione con distanza tra 3 e 39
| buttonX-gesture-left-long ^(1)^ | azione con distanza maggiore o uguale a 40
| buttonX-gesture-right ^(1)^ | azione con distanza tra 3 e 39
| buttonX-gesture-right-long ^(1)^ | azione con distanza maggiore o uguale a 40
| Modifier | Description
| ctrl | key @k(-C-)
| alt | key @k(-A-)
| ctrl-alt | keys @k(-C-) and @k(-A-)
|========================================
[NOTE]
^(1)^ "X" è il numero del pulsante usato nell'azione (da 1 a 9).
// TRANSLATION MISSING
List of buttons/wheel:
[width="50%",cols="3m,4",options="header"]
|========================================
| Button/wheel | Description
| button1 | click sul tasto sinistro
| button2 | click sul tasto destro
| button3 | click sul tasto centrale (spesso click sulla rotellina)
| button4 ... button9 | click sui pulsanti extra
| wheelup | rotellina (su)
| wheeldown | rotellina (giù)
|========================================
// TRANSLATION MISSING
List of gestures (only for buttons, not wheel):
[width="50%",cols="3m,4",options="header"]
|========================================
| Gesture | Distance
| gesture-up | 3 ... 19
| gesture-up-long | ≥ 20
| gesture-down | 3 ... 19
| gesture-down-long | ≥ 20
| gesture-left | 3 ... 39
| gesture-left-long | ≥ 40
| gesture-right | 3 ... 39
| gesture-right-long | ≥ 40
|========================================
// TRANSLATION MISSING
Example of events:
* `button1`
* `ctrl-button1`
* `button1-gesture-right`
* `alt-button2-gesture-down-long`
* `wheelup`
* `ctrl-alt-wheeldown`
* ...
[TIP]
Quando si associa un tasto nel contesto "mouse", è possibile far corrispondere
più eventi usando '*' all'inizio o alla fine del nome, ad esempio
`button1-gesture-*` corrisponderà ad ogni azione compiuta col tasto sinistro.
// TRANSLATION MISSING
[TIP]
You can find an event name with command `/input grab_mouse` then doing event
with mouse. This will insert event name on command line.
[[command_line]]
Riga di comando
~~~~~~~~~~~~~~~
File diff suppressed because it is too large Load Diff