]> git.armaanb.net Git - st.git/commitdiff
fix: correctly encode mouse buttons >= 8 in X10 and SGR mode
authorHiltjo Posthuma <hiltjo@codemadness.org>
Fri, 19 Mar 2021 10:54:36 +0000 (11:54 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Fri, 19 Mar 2021 10:58:59 +0000 (11:58 +0100)
These are typically mapped in X11 to the side-buttons (backward/forwards) on
the mouse. A comparison of the button numbers in SGR mode (first field):

st old:
0 1 2 64 65 66 67 68 69 70

st new (it is the same as xterm now):
0 1 2 64 65 66 67 128 129 130

A script to test and reproduce it, first argument is "h" (on) or "l" (off):

#!/bin/sh
printf '\x1b[?1000%s\x1b[?1006%s' "$1" "$1"

for n in 1 2 3 4 5 6 7 8 9 10; do
printf 'button %d\n' "$n"
xdotool click "$n"
printf '\n\n'
done


No differences found