Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal keyboard controls #262

Closed
frysztak opened this issue Jan 9, 2017 · 14 comments · Fixed by #3315
Closed

Modal keyboard controls #262

frysztak opened this issue Jan 9, 2017 · 14 comments · Fixed by #3315

Comments

@frysztak
Copy link

frysztak commented Jan 9, 2017

Do you have plans to implement Termite-like selection mode?

@jwilm
Copy link
Contributor

jwilm commented Jun 20, 2017

Can you elaborate a bit?

We now support the following selection modes

  • Cell-by-cell as cursor moves
  • Semantic selection (i.e. words) on double-click and as cursor is moved after double-click.
  • Line select on triple-click and as cursor is moved after triple-click

Is there something beyond that we should support?

@frysztak
Copy link
Author

In Termite once you press Ctrl+Shift+Space you enter selection mode. You move the cursor around using hjkl, enter visual mode (using v) to select text, scroll using Ctrl+B, Ctrl+F and so on. Pretty much just like Vim. It might be the same thing as cell-by-cell selection, I'll have to try. How do I test it?

@jwilm
Copy link
Contributor

jwilm commented Jun 20, 2017

Oh, we don't have anything like that. However, I have already been considering such a feature, so expect to see it added at some point in the future.

@jwilm jwilm changed the title Selection mode Modal keyboard controls Jun 20, 2017
@jwilm
Copy link
Contributor

jwilm commented Jun 20, 2017

Changed the title to Modal keyboard controls. The feature is basically as described--enter "normal" mode with some hot key, v to enter "visual" mode, keybindings for scrolling, selection manipulation, etc.

@norcalli
Copy link

Now that we have scrollback, if this feature was added, it would be a killer feature for alacritty. Although I'm wondering if it's something that could be abstracted away and implemented on a higher level if alacritty was extracted into a library or if this needs to be baked in. I'm not a terminal dev, just an avid fan, so that's where my knowledge ends.

@ngortheone
Copy link

Hi @jwilm @chrisduerr
Alacritty is awesome and I use it every day both at home and work!

Just curious - is this feature on a roadmap?
I use i3wm and currently if I want to scroll-back and copy something using keyboard i have to use tmux. This is not super convenient as tmux as I either need to start tmux manually for individual terminal instance or do automatic tmux enter on shell login. The latter creates a mess of a nested tmux layouts inside i3 layouts...

And are there any workaround? Are there users with i3 and what do they use for scroll-select-copy?

@chrisduerr
Copy link
Member

It's definitely planned, though since this is a pretty 'advanced' feature I can't make any guarantees that it will land anytime soon.

I'm interested in this myself, however I also want this done right and there are other features which might have priority for now.

@EgZvor
Copy link

EgZvor commented Oct 11, 2019

I'm wondering if it's something that could be abstracted away

Urxvt has this functionality implemented as a plugin https://github.com/muennich/urxvt-perls/blob/master/keyboard-select which suggests, I guess, that the answer is yes?

I also want to add as an urxvt user (on the edge of switching) that this feature is very much desirable.

@waynr
Copy link
Contributor

waynr commented Oct 13, 2019

I was just considering filing a similar issue, glad I searched first :)

I am interested in taking this issue on, although I understand @chrisduerr that you expressed some anxiety about doing it right so a relatively green Rustacean like myself might not be the most suitable person. I'd be happy to work on it with your direction though!

@chrisduerr chrisduerr self-assigned this Feb 5, 2020
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 9, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 13, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 15, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 16, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 17, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 18, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 21, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 23, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Feb 28, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Mar 5, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Mar 15, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Mar 17, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit to chrisduerr/alacritty that referenced this issue Mar 18, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes alacritty#262.
chrisduerr added a commit that referenced this issue Mar 18, 2020
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes #262.
@vi
Copy link

vi commented Mar 17, 2021

I triggered this feature by mistake multiple times and only now found out that I need Ctrl+Shift+Space to turn if off (was restarting Alacritty and reconnenting to Tmux instead).

Shall Alacirtty show some message like "Selection mode activated. Press Ctrl+Shift+Space to leave it" so that users who accidentally pressed Ctrl+Shift+Space instead of e.g. Ctrl+Shift+V know what to search for?

@nixpulvis
Copy link
Contributor

@vi #4630 addressed this issue for me. Are you running a version of Alacritty with this feature?

@vi
Copy link

vi commented Mar 17, 2021

Now running alacritty 0.5.0 (a6681e3).

@adworacz
Copy link

Looks like commit @nixpulvis referenced was attached to the 0.7.0 release. So you’ll need to update @vi to get what you want.

@Nate-Wilkins
Copy link

Is there a way to add additional shortcuts when in "keyboard motion mode"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.