After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781130 - vte_terminal_set_scroll_on_keystroke() reset scrollback on modkeys if they are used as combo for switching X keyboard layout
vte_terminal_set_scroll_on_keystroke() reset scrollback on modkeys if they a...
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.46.x
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-10 12:45 UTC by Kresp
Modified: 2017-04-16 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (926 bytes, patch)
2017-04-10 22:53 UTC, Egmont Koblinger
committed Details | Review

Description Kresp 2017-04-10 12:45:52 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.
Comment 1 Egmont Koblinger 2017-04-10 22:43:44 UTC
I guess you meant to say (or the syntax has changed over time):

$ setxkbmap -model pc104 -option grp:ctrl_shift_toggle en_US,ru
Comment 2 Egmont Koblinger 2017-04-10 22:53:16 UTC
Created attachment 349643 [details] [review]
Fix
Comment 3 Egmont Koblinger 2017-04-10 23:05:20 UTC
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?
Comment 4 Kresp 2017-04-11 07:31:14 UTC
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 5 Egmont Koblinger 2017-04-16 20:04:40 UTC
Comment on attachment 349643 [details] [review]
Fix

Committed to master & 0-48.
Comment 6 Egmont Koblinger 2017-04-16 20:05:10 UTC
Okay, no refactoring for now, just this plain fix :) Closing.