2

This article is about the keyboard key combination 'Control + t' (smallcase 't') and emacs.

This problem is exclusive to the gui version and does not come up while using the terminal.

I am using Wayland

  1. Control+t : The cursor just blinks and nothing happens.
    • C-h k + C-t (Control+h and k followed by Control + t) : Nothing shows up.
    • C-h k + C-S-t : Works. Shows this

'C-t (translated from C-S-t) runs the command transpose-chars (found in global-map), which is an interactive compiled Lisp function...'

Note Translated from C-S-t

This basically means that Control-t is getting eaten up somewhere in the process.

Some more info and curious things -

  1. Control+t and terminals -

    1. Works in Kitty and termite - Detected by wev ; C-t 'tranpose-chars' in emacs-mode (bindkey -e in zsh) works
    2. Does not work in konsole - Detected by wev ; C-t 'tranpose-chars' in emacs-mode (bindkey -e in zsh) does not work.
  2. wev output -


    [14:     wl_keyboard] key: serial: 5101; time: 10021865; key: 66; state: 1 (pressed)
                      sym: Control_L    (65507), utf8: ''

    [14:     wl_keyboard] modifiers: serial: 0; group: 0
                          depressed: 00000004: Control 
                          latched: 00000000
                          locked: 00000000
    
    [14:     wl_keyboard] key: serial: 5103; time: 10022192; key: 28; state: 1 (pressed)
                          sym: t (116), utf8: ''

  1. Emacsclient -t (emacs client on terminal and tty) Works.

C-t runs the command transpose-chars (found in global-map), which is an interactive compiled Lisp function in `simple.el'.

  1. Firefox and Chrome is able to detect the keypresses. Tested on https://keyboardchecker.com/

What do I need?

  1. I need to understand why this is happening.
  2. The solution to the same.

And I need your help.

TODO:

  1. Need to check the same in X11 and then report.

[Update] The same problem persists in X11. Again, Control+Shift+t works but not Control+t

[Update] This is not about emacs anymore.

This issue persists across DEs. It has not infected the TTYs however.

  1. I switched to Debian Sid from Arch (where I stumbled on it). Thr issue went. However my laptop with DSid has this issue but it was not there on my pc. Weird.
  2. Switched from Sid to Stable because some upgrade broke a lot of packages. Stable got infected with this problem. However after getting rid of .cache and .config, it went away and quickly came back after a reboot. I retried the same but this time it did not work.
  3. Currently on Xubuntu and so far it does not have this issue.
  4. Note that i used nearly the same config on each distro. My home directory is on a different partition. Therefore, I can migrate my / seemlessly.
  5. [Update] 11th November 2020 - Xubuntu infected too.

I am finally giving up.

[Update] Issue resolved. After scourging through all the possible key combinations that existed on this pc, I found that it was qstardict erroneously eating up all the Control+t. Disabled it and the issue is resolved.

3
  • You didn't tell us which desktop environment or Linux distribution you are using. Check the settings if there is a shortcut that "eats" the Control-t. Commented Oct 17, 2020 at 16:54
  • Arch linux. DEs - Gnome, KDE, mate, sway, i3. No shortcut 'eats' the keybinding. I have checked several times. I switched to debian and somehow it got fixed. Commented Oct 18, 2020 at 19:59
  • This is a mystery. I have used KDE Plasma on Arch Linux on several machines, and have never had this problem. Good that you found a solution (provided you are happy with Debian). Commented Oct 19, 2020 at 5:42

1 Answer 1

0

To provide some background information, the following is from Ctrl-h k Ctrl-t:

C-t runs the command transpose-chars (found in global-map), which is an interactive compiled Lisp function in ‘simple.el’.

It is bound to C-t.

(transpose-chars ARG)

Interchange characters around point, moving forward one character. With prefix arg ARG, effect is to take character before point and drag it forward past ARG other characters (backward if ARG negative). If no argument and at end of line, the previous two chars are exchanged.

In other words: pressing Ctrl-T will flip the position of the previous two characters. I was pleasantly surprised to find that this also works in bash:

$ tpo # press Ctrl-t
$ top

Personally, I experience no issues with using this keyboard shortcut. In bash and emacs it correctly transposes the previous characters, and in web browsers, for instance, it opens a new tab.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .