Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:12:42+00:00 2026-06-13T21:12:42+00:00

I have asked a question about Ctrl-arrow keybinding in Emacs in terminal: Emacs Ctrl

  • 0

I have asked a question about Ctrl-arrow keybinding in Emacs in terminal:

Emacs Ctrl modifiers don't work in console

And was told, that Linux terminal emulator doesn’t process this combination. I managed to create a file for loadkeys command, that processes these keys:

control keycode 105 = F100
string F100 = "\033[[left"
control keycode 106 = F101
string F101 = "\033[[right"

Then loaded it from root:

#loadkeys ./funcskeys

After that every time I click Ctrl-right or Ctrl-left in console, I get ‘right’ or ‘left’ printed. Now I need to process this in Emacs. As far as I understand from this question:

Binding M-<up> / M-<down> in Emacs 23.1.1

it must be done, using input-decode-map function. But I couldn’t make it work. Plz, help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:12:43+00:00Added an answer on June 13, 2026 at 9:12 pm

    Change your “funcskeys” file slightly to produce the following escape sequences:

    control keycode 105 = F100
    string F100 = "\033[1;5D"
    control keycode 106 = F101
    string F101 = "\033[1;5C"
    

    Then add the following lines to your .emacs file:

    (define-key input-decode-map "\e[1;5C" [(control right)])
    (define-key input-decode-map "\e[1;5D" [(control left)])
    

    After running loadkeys and restarting Emacs, CTRL+left and CTRL+right should work. You can verify this by typing:

    C-h k C-right

    and

    C-h k C-left

    To actually bind these keystrokes to a command, such as forward-word, you might have to add the following lines to your .emacs file as well:

    (global-set-key [(control right)] 'forward-word)
    (global-set-key [(control left)] 'backward-word)
    

    Note that this whole approach specifically only makes the key combinations CTRL+left and CTRL+right work. It does not for instance make ALT+left / ALT+right work, or any other key combinations involving the CTRL character.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked this question here about a Python command that fetches a URL
I have asked this question about using the a Linq method that returns one
i have asked a question about manytomanyfield here which i solved but now a
Recently I have asked a question about what I should use to create self-contained
I have asked a similar question about command line arguments in C++ some hours
I have tried looking though several of the already asked question about this topic
I have been asked to post a new question about how to correctly sort
I asked a question about bigints yesterday which was kindly answered. However, I have
I have a quick question about ARC in iOS. (Sorry I've asked so many
I have asked a question about how to retrieve data from different tables in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.