mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-11 03:25:45 +00:00
Fixes scroll wheel support with modifiers for GNOME Terminal
This commit is contained in:
parent
41994632cf
commit
4fcfdbaff3
@ -401,18 +401,15 @@ Program.prototype._bindMouse = function(s) {
|
|||||||
|
|
||||||
if (this.zero) key.x--, key.y--;
|
if (this.zero) key.x--, key.y--;
|
||||||
|
|
||||||
mod = b >> 3;
|
mod = b >> 2;
|
||||||
key.shift = mod & 4;
|
key.shift = !!(mod & 1);
|
||||||
key.meta = mod & 8;
|
key.meta = !!((mod >> 1) & 1);
|
||||||
key.ctrl = mod & 16;
|
key.ctrl = !!((mod >> 2) & 1);
|
||||||
|
|
||||||
b -= 32;
|
b -= 32;
|
||||||
|
|
||||||
if (b === 64) {
|
if ((b >> 6) & 1) {
|
||||||
key.action = 'wheelup';
|
key.action = b & 1 ? 'wheeldown' : 'wheelup';
|
||||||
key.button = 'middle';
|
|
||||||
} else if (b === 65) {
|
|
||||||
key.action = 'wheeldown';
|
|
||||||
key.button = 'middle';
|
key.button = 'middle';
|
||||||
} else if (b === 3) {
|
} else if (b === 3) {
|
||||||
// Could also be a movement.
|
// Could also be a movement.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user