Keyboard bindings for highlighting text

There’s an alt + shift + right (or left/up/down) keyboard binding to highlight text but it’s pretty narrow

Ideal would be:
Alt+shift+ right or left == highlight one word a time
Super (or any else) + shift + right or left == highlight the entire line from the cursor onwards

How can something like this be configured?

In current gnome - Wayland or x - you can only do one word a time, or the whole line (but not from the cursor onwards)

I’ve gotten familiar with the gnomejs, xdotool, xbindkeys… and I’m fluent in python. So I’m willing to write my own code if necessary. But it seems a hard one in Linux as soon as it comes to user input of any kind.

In what context are you trying to achieve what you are describing?

For example, if you are trying this in the context of a terminal, I cannot help (not aware of any ways to highlight in terminal, never needed it).

But if you are trying to achieve that in the context of text editors, I believe the following are mostly universal:

  • Shift + / selects a single character to the direction
  • Ctrl + Shift + / selects a word at a time to the direction
  • Ctrl + Shift + Start/End selects from cursor to start/end of line
  • Shift + / selects from cursor position on current line to cursor position on previous/next line
1 Like

In any text edit area unless the terminal.
The key combinations you outline seem what I want… unless…

  • Ctrl + Shift + Start/End selects from cursor to start/end of line

This one doesn’t do that on my end.
It selects the whole line to the left and right of the cursor.

And clearly that’s because … I don’t know what Start/End is, I guess.

In my case (Mac keyboard) I’ve only arrows. I think there’s no start/end on those?

So I guess my updated task is to find a way to trigger the same in a MacBook keyboard?

I do not own a Mac, but a quick search suggests that on Mac keyboards it would be:

  • Home (my bad for naming it “Start”): Command +
  • End: Command +

So the shortcut would become:

  • Shift + Command + /
    (after testing I believe Ctrl is not needed for this shortcut, because Home/End is controlling the navigation. It should only be needed for moving 1 word at a time)

Do those work for you as expected?

Let me clarify first:

On the mac, it is like so:

  • option + shift + /
    ==> does selection one word a time to left or right.
    ==> note, option should correspond to what is otherwise known as LEFTALT
  • command + shift + / (or up and down arrows)
    ==> selects entire line from cursor to left or right, or entire text up to document start or end.
    ==> note, command should correspond to what is otherwise known as WINDOWS key on windows systems. But I have seen it referred often as SUPER, too. And weirdly, on linux EOS natively the same functions as command has on mac, is done by control.

On my current EOS with gnome on X:

  • option + shift + /
    ==> does nothing. And I would like it to keep doing the same as on mac.
  • command + shift + /
    ==> Selects one word a time just like the above does on mac. It should however select the whole lines as it does on mac.

I found that this is because I swapped control and command, since the behaviour of these keys is directly opposed as on mac. So indeed it works as you describe, considering that my command, is the linux native control.
However, as I have no start and end buttons, the “highlight entire line” does not work as the command key is now control functionality. It SHOULD thus work with control + shift + arrows, but it does not.
This remains the case even if I reset the key swap that I use currently.


It appears to me that linux confuses some things?
Indeed in the tweaks of gnome, I can see it offers me to change “overview” shortcut, which is (by default) the command key (it triggers the overview). Yet they refer to it as the Left Super and Right Super key. Which I could live with.
However, in the setting where I swap ccontrol and command, they refer to command as Left Win.

Unfortunately it seems pretty much a chaos out there, because if you refer to online resources it gets worse.
Some refer to Super key as equivalent to the Meta key, other references stating that Emacs calls Esc the Meta key, the Super key to be equivalent to the Windows logo key or the ⌘ (command) key. This latter would match as well what I actually experience on the current install.

… I think to start with, one has to agree/know the real naming of these keys lol.

Then, I need to somehow bring the functionality referred to above into the current EOS install, which currently is neither working the way you describe if in vanilla status, nor doing what i would like in customized status :frowning:

Hooooooly :cow: !!
By accident! I found:
fn + Shift + arrows do the same as the command + Shift + arrows on mac…

wt*
This is obnoxious lol. Need to find a way to reconfigure that, probably have to use xdotool or so.

Ok, for the desperate stubborn *** like me out there - there’s a tool https://github.com/rbreaves/kinto.

It’s NOT exactly made for arch distros but if you know your way around you can get it to work.
And, once that’s done… you’ve Mac keyboard behavior back. 1:1.

The only caveat: when you setup custom keyboard shortcuts using the system settings you’ll get VERY weird statements, such as if you for example map „cmd space“, gnome will show it as „alt esc“. Ignore it. Gnome interprets it wrong. If you do the same in xdotool, you’ll see the keyboard is mapped „correctly“.

Now on to fix the last big thing gnome also seem to get a bit wrong on a Mac: power control. :crossed_fingers:
Again feels gnome has made the worst choice here.
Tlp seems better than ppd, according benchmarks. Currently testing tlp after killing ppd …

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.