How can I remap the shortcut keys for scroll down/up in gnome terminal
[OPTIONAL]
I'm a vimer too and I feel uncomfortable with the default Ctrl position so I remapped the Window's Meta to be an additional Ctrl key. NOTE: you'll need xmodmap
.
remove Control = Control_L Control_R
remove mod4 = Super_L Super_R
add Control = Control_L Super_L
[STEPS]
To remap Ctrl + J and Ctrl + K in Konsole
follow these steps:
- Go to Settings -> Configure Current Profile -> Input
- Edit the Linux Console key binding
- Add a new key binding to scroll down a line at a time: J + Ctrl -> ScrollLineDown
- Add a new key binding to scroll up a line at a time: K + Ctrl -> ScrollLineUp
Some screenshots
NOTE: Now you'll be able to scroll up and scroll down a line at a time using the configured shortcuts.
EDIT #1
Alt does work!! Just change Ctrl with Alt in the bindings.
Related videos on Youtube
Marslo
Updated on September 18, 2022Comments
-
Marslo over 1 year
According the gnome-terminal usage:
You can also scroll up or down one line at a time by pressing Control+Shift+Up or Control+Shift+Down.
In this document shows: Control + Shift + Up / Down can scroll up or scroll down the
gnome-terminal
one line. And, yes, they can!Now, I want to re-map these two shortcut keys, like: Alt + J / K (Vimer habit).
My understanding
Here some signal must be triggered after press Ctrl + Alt + Up | Down.
The question is, what signal is triggered?
Here are some questions:
-
0x115
is the signal of windows scrolling. what about Linux? - Can the scrolling be executed by command in gnome-terminal? (Some command inputted and gnome-terminal scrolling up/down)
I've download the source code of Gnome-Terminal, and tried to find the answer. But my C is terrible...
By the way, my Linux is Ubuntu 13.10, and
gnome-terminal
is 3.6:$ gnome-terminal --version GNOME Terminal 3.6.1 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.10 Release: 13.10 Codename: saucy
-
-
Marslo about 10 yearsThis shortcut is not the "regular" terminal shortcut. Can you found any settings for
scroll one line
inEdit
->Preferences
->Shortcuts
? No!!! Because I've checked that place long long time ago! -
slm about 10 years@Marslo - Sorry I think you misunderstood what I said. The screenshot shows that you cannot edit these. I've expanded my A to make that more obvious. The same is also mentioned here: askubuntu.com/questions/247539/…
-
slm about 10 years@Marslo - yes until you asked this Q I would've guessed that this is modifiable. Makes no sense why it wouldn't be. I would take a look in
dconf-editor
. Things are sometimes doable there when the regular GUIs don't expose it. -
slm about 10 years@Marslo - yes I know, I added them to make that line in the output more obvious. Sorry about that. I thought the line in the screenshot was obvious, but based on your reaction I'm guessing it wasn't 8-)
-
Marslo about 10 yearsHi @slm, actually, I'm very thanks for your A. I've also checked the
dconf-editor
, but nothing found. Hope you can surprise me! :) -
Marslo about 10 yearsIn windows, I can remap the shortcuts by AutoHotKey. In this way, I needn't modified any settings, just remap
alt+j => ctrl+shift+up
. And, also I triedxbindkeys
, I found this tools needs command, for example, I can remapctrl+j
==>gnome-terminal
. That means, terminal would be startup while I pressctrl+j
-
slm about 10 yearsThe
xmodmap
method orxbindkeys
are the 2 ways I would go about it outside of gnome-terminal. -
vfclists almost 7 yearsWhere is the documentation for the list of keywords that
ScrollLineDown
andScrollLineUp
come from?