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

keybindings with Ctrl or Alt #131

Closed
dmalikov opened this issue Apr 10, 2013 · 5 comments
Closed

keybindings with Ctrl or Alt #131

dmalikov opened this issue Apr 10, 2013 · 5 comments

Comments

@dmalikov
Copy link
Contributor

man tigrc says that current keybindings mechanism is slightly powerless.

   Key values
       Key values should never be quoted. Use either the ASCII value or one of the following symbolic key names. Symbolic key names are case insensitive, Use Hash to bind to the # key, since the hash
       mark is used as a comment character.

   Enter, Space, Backspace, Tab, Escape, Left, Right, Up, Down, Insert, Delete, Hash, Home, End, PageUp, PageDown, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12.

So user couldn't have binding like that?

bind generic Ctrl-S <command>
@vivien
Copy link
Contributor

vivien commented Apr 10, 2013

Use the conventional ^ char to bind the Ctrl key. i.e. the following binds Ctrl-t to execute ls:

:bind generic ^t !ls

@dmalikov
Copy link
Contributor Author

Ok.

af added a commit to af/tig that referenced this issue May 7, 2013
After running into issue jonas#131 myself, thought it would be nice to explain how to do Ctrl key bindings in the tigrc man file. Awesome program by the way!
jonas pushed a commit that referenced this issue May 9, 2013
Fixes GH-131 by providing an explanation in the man pages.
Closes GH-141.

[ jf: reworked the commit message ]
@fabarea
Copy link

fabarea commented Apr 15, 2015

What about the alt, is this possible to bind with?

@c02y
Copy link

c02y commented Jun 11, 2019

Unable to bind key like <Alt-v>.

Any updates?

@Lenbok
Copy link

Lenbok commented Dec 8, 2020

@c02y It turns out a binding like this will work for Alt-v:

bind generic	<Esc>v	move-page-up

And also non-obviously, you can get emacsy Alt-< and Alt-> for first and last line respectively like this:

bind generic	<Esc><LT>	move-first-line
bind generic	<Esc>>	move-last-line

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

No branches or pull requests

5 participants