GNOME Bugzilla – Bug 781130
vte_terminal_set_scroll_on_keystroke() reset scrollback on modkeys if they are used as combo for switching X keyboard layout
Last modified: 2017-04-16 20:05:10 UTC
$ setxkbmap -model pc104 -option:ctrl_shift_toggle en_US,ru Whenever X keyboard layout is set to toggle on modkey combo press, this key combination causes terminal scrollback to reset if option "Scroll on keystroke" is enabled. This is especially annoying if Ctrl+Shift is used as the switch combination, since it makes use of Ctrl+Shift+Up/Down to fine-scroll challenging. Since this are modkeys, they should not count as a keystroke within terminal. Especially since processing of those happens out of scope of terminal by an outside application.
I guess you meant to say (or the syntax has changed over time): $ setxkbmap -model pc104 -option grp:ctrl_shift_toggle en_US,ru
Created attachment 349643 [details] [review] Fix
Kresp, thanks for this bugreport! I keep changing layouts all the time, but use GNOME's infrastructure which doesn't rely on xkb groups but rather handles the hotkey itself and installs a new xkb keymap each time. That's why I didn't notice this bug. It's indeed one of those bugs that are a usability nightmare. Christian: What do you know about the keys where keymap.cc _vte_keymap_key_is_modifier() and vte.cc VteTerminalPrivate::widget_key_press() differ in either direction? Is my proposed patch good enough, or should we move forward and merge the two lists and factor out the common bits of these two methods?
Syntax did not change, you are quite correct with your version. I used different machine for reporting this bug, and made a mistake writing the command down. Also, I checked your patch against vte-0.46.1 and xfce4-terminal-0.8.3 and can confirm that it works.
Comment on attachment 349643 [details] [review] Fix Committed to master & 0-48.
Okay, no refactoring for now, just this plain fix :) Closing.