Skip to content

Commit

Permalink
core: add support of SGR mouse events, remove option weechat.look.mou…
Browse files Browse the repository at this point in the history
…se_timer_delay (closes #2082)
  • Loading branch information
flashcode committed Mar 6, 2024
1 parent a8a0053 commit 5c88ee9
Show file tree
Hide file tree
Showing 37 changed files with 920 additions and 376 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.adoc
Expand Up @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele

New features::

* core: add support of SGR mouse events (issue #2082)
* core: reintroduce help on the variables and operators in `/help eval` (issue #2005)
* core: add option `-s` in command `/command` to execute multiple commands separated by semicolons
* core: allow case insensitive search of partial buffer name with `(?i)name` in command `/buffer`
Expand Down Expand Up @@ -45,6 +46,7 @@ Bug fixes::

Tests::

* core: add tests on mouse events (issue #2082)
* scripts: add tests on constants

Build::
Expand Down
31 changes: 22 additions & 9 deletions doc/de/weechat_user.de.adoc
Expand Up @@ -2718,27 +2718,40 @@ und löschen (für die Syntax, siehe Befehl <<command_weechat_key,/key>>).
Der Name eines Ereignisses besteht aus einem Modifier (optional), einer Maustaste/Mausrad
und der Mausgeste (optional). Die unterschiedlichen Elemente werden durch ein `+-+` getrennt.

Liste der Modifiers:
// TRANSLATION MISSING
List of modifiers (by order in the event name):

[width="100%",cols="1m,4",options="header"]
|===
| Modifier | Beschreibung
| alt | Taste kbd:[Alt]
| ctrl | Taste kbd:[Ctrl]
| alt-ctrl | Taste kbd:[Alt] + kbd:[Ctrl]
| shift | Taste kbd:[Shift] ^(1)^
|===

// TRANSLATION MISSING
[NOTE]
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
use this modifier to catch directly mouse events.

// TRANSLATION MISSING
Several modifiers can be combined, for example:

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

Liste der Maustasten/Mausrad:

[width="100%",cols="1m,4",options="header"]
|===
| Maustaste/-rad | 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
| Maustaste/-rad | 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 ... button11 | Ein zusätzlicher Mausknopf wird gedrückt
| wheelup | Mausrad wird nach oben gescrollt
| wheeldown | Mausrad wird nach unten gescrollt
|===

Liste der Mausgesten (nur für Maustasten, nicht für das Mausrad, anwendbar):
Expand Down
2 changes: 2 additions & 0 deletions doc/en/weechat_dev.en.adoc
Expand Up @@ -443,6 +443,8 @@ WeeChat "core" is located in following directories:
|          test-gui-key.cpp | Tests: keys.
|          test-gui-line.cpp | Tests: lines.
|          test-gui-nick.cpp | Tests: nicks.
|          curses/ | Root of unit tests for Curses interface.
|             test-gui-curses-mouse.cpp | Tests: mouse (Curses interface).
|       plugins/ | Root of unit tests for plugins.
|          irc/ | Root of unit tests for IRC plugin.
|             test-irc-batch.cpp | Tests: IRC batched events.
Expand Down
28 changes: 19 additions & 9 deletions doc/en/weechat_user.en.adoc
Expand Up @@ -2679,27 +2679,37 @@ You can change or add bindings with the command `/key` using context "mouse"
Event name consists of a modifier (optional), a button/wheel name and a gesture
(optional). Different elements are separated by `+-+`.

List of modifiers:
List of modifiers (by order in the event name):

[width="100%",cols="1m,4",options="header"]
|===
| Modifier | Description
| alt | Key kbd:[Alt]
| ctrl | Key kbd:[Ctrl]
| alt-ctrl | Keys kbd:[Alt] + kbd:[Ctrl]
| shift | Key kbd:[Shift] ^(1)^
|===

[NOTE]
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
use this modifier to catch directly mouse events.

Several modifiers can be combined, for example:

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

List of buttons/wheel:

[width="100%",cols="1m,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)
| Button/wheel | Description
| button1 | Click on left button
| button2 | Click on right button
| button3 | Click on middle button (often click on wheel)
| button4 ... button11 | Click on extra buttons
| wheelup | Wheel (up)
| wheeldown | Wheel (down)
|===

List of gestures (only for buttons, not wheel):
Expand Down
2 changes: 2 additions & 0 deletions doc/fr/weechat_dev.fr.adoc
Expand Up @@ -445,6 +445,8 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|          test-gui-key.cpp | Tests : touches.
|          test-gui-line.cpp | Tests : lignes.
|          test-gui-nick.cpp | Tests : pseudos.
|          curses/ | Racine des tests unitaires pour l'interface Curses.
|             test-gui-curses-mouse.cpp | Tests : souris (interface Curses).
|       plugins/ | Racine des tests unitaires pour les extensions.
|          irc/ | Racine des tests unitaires pour l'extension IRC.
|             test-irc-batch.cpp | Tests : évènements batch IRC.
Expand Down
29 changes: 20 additions & 9 deletions doc/fr/weechat_user.fr.adoc
Expand Up @@ -2743,27 +2743,38 @@ utilisant le contexte "mouse" (pour la syntaxe voir la commande
Un nom d'évènement consiste en un modificateur (facultatif), un bouton/roulette
et un geste (facultatif). Les différents éléments sont séparés par `+-+`.

Liste des modificateurs :
Liste des modificateurs (par ordre dans le nom de l'évènement) :

[width="100%",cols="1m,4",options="header"]
|===
| Modificateur | Description
| alt | Touche kbd:[Alt]
| ctrl | Touche kbd:[Ctrl]
| alt-ctrl | Touches kbd:[Alt] + kbd:[Ctrl]
| shift | Touche kbd:[Shift] ^(1)^
|===

[NOTE]
^(1)^ Le modificateur `shift` peut rarement être utilisé dans WeeChat car
beaucoup de terminaux utilisent ce modificateur pour attraper directement les
évènements souris.

Plusieurs modificateurs peuvent être combinés, par exemple :

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

Liste des boutons/roulette :

[width="100%",cols="1m,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)
| 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 ... button11 | Clic sur un bouton additionnel
| wheelup | Roulette (haut)
| wheeldown | Roulette (bas)
|===

Liste des gestes (seulement pour les boutons, pas la roulette) :
Expand Down
31 changes: 22 additions & 9 deletions doc/it/weechat_user.it.adoc
Expand Up @@ -2955,27 +2955,40 @@ contesto "mouse" (per la sintassi, consultare comando
Il nome dell'evento consiste di un modificatore (opzionale), il nome di un
pulsante/rotellina e un'azione (opzionale). Elementi diversi sono separati da `+-+`.

Elenco di modificatori
// TRANSLATION MISSING
List of modifiers (by order in the event name):

[width="100%",cols="1m,4",options="header"]
|===
| Modificatore | Descrizione
| alt | Tasto kbd:[Alt]
| ctrl | Tasto kbd:[Ctrl]
| alt-ctrl | Tasto kbd:[Alt] + kbd:[Ctrl]
| shift | Tasto kbd:[Shift] ^(1)^
|===

// TRANSLATION MISSING
[NOTE]
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
use this modifier to catch directly mouse events.

// TRANSLATION MISSING
Several modifiers can be combined, for example:

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

Elenco di pulsanti/rotellina:

[width="100%",cols="1m,4",options="header"]
|===
| Pulsante/rotellina | 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ù)
| Pulsante/rotellina | Descrizione
| button1 | Click sul tasto sinistro
| button2 | Click sul tasto destro
| button3 | Click sul tasto centrale (spesso click sulla rotellina)
| button4 ... button11 | Click sui pulsanti extra
| wheelup | Rotellina (su)
| wheeldown | Rotellina (giù)
|===

Elenco di azioni (solo per i pulsanti, non la rotellina):
Expand Down
4 changes: 4 additions & 0 deletions doc/ja/weechat_dev.ja.adoc
Expand Up @@ -496,6 +496,10 @@ WeeChat "core" は以下のディレクトリに配置されています:
|          test-gui-line.cpp | テスト: 行
// TRANSLATION MISSING
|          test-gui-nick.cpp | テスト: nicks
// TRANSLATION MISSING
|          curses/ | Root of unit tests for Curses interface.
// TRANSLATION MISSING
|             test-gui-curses-mouse.cpp | Tests: mouse (Curses interface).
|       plugins/ | プラグインの単体テストを収める最上位ディレクトリ
|          irc/ | IRC プラグインの単体テストを収める最上位ディレクトリ
// TRANSLATION MISSING
Expand Down
31 changes: 22 additions & 9 deletions doc/ja/weechat_user.ja.adoc
Expand Up @@ -2865,27 +2865,40 @@ WeeChat はデフォルトマウスイベントの多くを定義しています
イベント名には修飾キー (任意)、ボタン/ホイール名、ジェスチャー (任意)
を利用できます。異なるイベントは `+-+` で分割してください。

修飾キーリスト:
// TRANSLATION MISSING
List of modifiers (by order in the event name):

[width="100%",cols="1m,4",options="header"]
|===
| 修飾キー | 説明
| alt | kbd:[Alt] キー
| ctrl | kbd:[Ctrl] キー
| alt-ctrl | kbd:[Alt] キー + kbd:[Ctrl]
| shift | kbd:[Shift] キー ^(1)^
|===

// TRANSLATION MISSING
[NOTE]
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
use this modifier to catch directly mouse events.

// TRANSLATION MISSING
Several modifiers can be combined, for example:

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

ボタン/ホイールのリスト:

[width="100%",cols="1m,4",options="header"]
|===
| ボタン/ホイール | 説明
| button1 | 左ボタンクリック
| button2 | 右ボタンクリック
| button3 | 中ボタンクリック (多くの場合ホイールクリック)
| button4 ... button9 | その他のボタンクリック
| wheelup | ホイール (上方向)
| wheeldown | ホイール (下方向)
| ボタン/ホイール | 説明
| button1 | 左ボタンクリック
| button2 | 右ボタンクリック
| button3 | 中ボタンクリック (多くの場合ホイールクリック)
| button4 ... button11 | その他のボタンクリック
| wheelup | ホイール (上方向)
| wheeldown | ホイール (下方向)
|===

ジェスチャーのリスト (ボタンのみ対応、ホイール未対応):
Expand Down
31 changes: 22 additions & 9 deletions doc/pl/weechat_user.pl.adoc
Expand Up @@ -2697,27 +2697,40 @@ Możesz zmienić lub dodać przypisania za pomocą komendy `/key` używając kon
Nazwa zdarzenia zawiera modyfikator (opcjonalny), nazwę klawisza/rolki i gest
(opcjonalny). Różne elementy są rozdzielane przez `+-+`.

Lista modyfikatorów:
// TRANSLATION MISSING
List of modifiers (by order in the event name):

[width="100%",cols="1m,4",options="header"]
|===
| Modyfikator | Opis
| alt | Klawisz kbd:[Alt]
| ctrl | Klawisz kbd:[Ctrl]
| alt-ctrl | Klawisze kbd:[Alt] + kbd:[Ctrl]
| shift | Klawisz kbd:[Shift] ^(1)^
|===

// TRANSLATION MISSING
[NOTE]
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
use this modifier to catch directly mouse events.

// TRANSLATION MISSING
Several modifiers can be combined, for example:

* `alt-ctrl`
* `ctrl-shift`
* `alt-ctrl-shift`

Lista klawiszy/rolek:

[width="100%",cols="1m,4",options="header"]
|===
| Klawisz/rolka | Opis
| button1 | Lewy klawisz myszy
| button2 | Prawy klawisz myszy
| button3 | Środkowy klawisz myszy (często naciśnięcie rolki)
| button4 ... button9 | Dodatkowe klawisze
| wheelup | Rolka (w górę)
| wheeldown | Rolka (w dół)
| Klawisz/rolka | Opis
| button1 | Lewy klawisz myszy
| button2 | Prawy klawisz myszy
| button3 | Środkowy klawisz myszy (często naciśnięcie rolki)
| button4 ... button11 | Dodatkowe klawisze
| wheelup | Rolka (w górę)
| wheeldown | Rolka (w dół)
|===

Lista gestów (tylko dla klawiszy, nie rolki):
Expand Down
4 changes: 4 additions & 0 deletions doc/sr/weechat_dev.sr.adoc
Expand Up @@ -445,6 +445,10 @@ WeeChat „језгро” се налази у следећим директо
|          test-gui-key.cpp | Тестови: тастери.
|          test-gui-line.cpp | Тестови: линије.
|          test-gui-nick.cpp | Тестови: надимци.
// TRANSLATION MISSING
|          curses/ | Root of unit tests for Curses interface.
// TRANSLATION MISSING
|             test-gui-curses-mouse.cpp | Tests: mouse (Curses interface).
|       plugins/ | Корен unit тестова додатака.
|          irc/ | Корен unit тестова IRC додатка.
|             test-irc-batch.cpp | Тестови: IRC пакетни догађаји.
Expand Down

0 comments on commit 5c88ee9

Please sign in to comment.