0

my .emacs.d/init.el has this :

(global-set-key (kbd "C-<prior>")  'backward-page)
(global-set-key (kbd "C-<next>")  'forward-page)

It works fine on my machine but when I ssh to a remote host from the terminal and run emacs remotely, it seems that hitting the keys doesn't send anything to it.

For eg., if I do ctrl + h k then ctrl + pgdn, the mode-line doesn't change, even if I repeat the keystrokes 3 times.

5
  • 1
    How are you trying it on a remote host? Through tramp? Or by sshing to the remote on the command line and starting an Emacs there? Or some other way? Please edit the question and add all relevant information to it.
    – NickD
    Dec 13, 2022 at 14:46
  • @NickD, thanks for the clarification request. I connect via ssh then run emacs remotely, not through tramp from local emacs.
    – ychaouche
    Dec 13, 2022 at 15:28
  • 1
    What terminal program are you using, and what does it say when you're ssh'd in to the remote system and run echo $TERM? (You might be able to fix things with some terminfo settings.)
    – g-gundam
    Dec 13, 2022 at 16:16
  • Thanks @g-gundam, as pointed out by jbe on #emacs on IRC, it was a terminal problem (konsole), which intercepts the keyboard shortcut. Trying same shortcut on xterm works fine. konsole uses the shortcut to switch tabs.
    – ychaouche
    Dec 13, 2022 at 17:12
  • 1
    @g-gundam if you post that as a solution I will accept it and close this question.
    – ychaouche
    Dec 13, 2022 at 17:12

1 Answer 1

1

Keybinding Conflicts

In this specific case, konsole was being used as a terminal, and it had already bound Ctrl-PgUp and Ctrl-PgDn to switch tabs. Thus, konsole intercepted those keys before Emacs could see it. This problem was solved by using another terminal xterm that didn't bind those keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.