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

Use <tab> keycode rather than TAB #3472

Closed
elemakil opened this issue Oct 19, 2015 · 8 comments
Closed

Use <tab> keycode rather than TAB #3472

elemakil opened this issue Oct 19, 2015 · 8 comments
Labels
Discussion Key Bindings stale marked as a stale issue/pr (usually by a bot) Terminals

Comments

@elemakil
Copy link

For historic reasons emacs treats the TAB and C-i keycodes as the same thing. Specifically, those historic reasons are that a terminal does not distinguish between the physical Ctrl + i and tab keys: They send the same code. As a workaround there's the function key code <tab> which is not mapped to TAB if it has a binding of its own; note: this only works in terminals with extended capability or non-terminal versions of emacs.

If the following scheme is used separate bindings for tab and Ctrl + i (the physical keys) can be used when emacs runs in a window system.

  • tab maps to <tab>
  • Ctrl + i maps to TAB or C-i

There are a few places in the spacemacs source, where the TAB keycode is used instead of the <tab> version event though they are intended to be bound to the physical tab key.

Fixing those (and ensuring that this becomes part of the contribution guidelines) will allow users to have separate binding for Ctrl + i and tab. Take Issue #3165 as an example of the resulting problem.

This is of special importance for an evil based configuration because traditionally Ctrl + i is used to step through the jump list.

I suggest two things:

  1. Fix the existing mentions of TAB to use <tab> instead whenever emacs is launched in non-terminal mode.
  2. Add an entry to the contribution guidelines / convention guidelines
@sooheon
Copy link

sooheon commented Oct 22, 2015

I wholeheartedly agree with this, I've personally encountered this issue in the help buffers and in org-mode

@StreakyCobra
Copy link
Contributor

Same problem append with S-BACKSPACE and C-H #1443

@StreakyCobra
Copy link
Contributor

This problem have also been reported in #2105, with an additional keybinding: RET vs <enter>.

@StreakyCobra
Copy link
Contributor

Same problem with TAB in help buffers on #3165. Workaround proposed and working for this special case in the issue.

@StreakyCobra
Copy link
Contributor

#3448 is another variant of this problem. It's asking if Spacemacs can support C-h to act as Backspace in terminals, or at least to have an option for this.

@xoich
Copy link

xoich commented Nov 15, 2015

I want C-h to act as backspace everywhere, not just in terminal.

@StreakyCobra
Copy link
Contributor

Oh, sorry for the misunderstanding.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Key Bindings stale marked as a stale issue/pr (usually by a bot) Terminals
Projects
None yet
Development

No branches or pull requests

5 participants