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 8344257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:18:28+00:00 2026-06-09T06:18:28+00:00

My goal is to set up a terminal in which a command-line interface program

  • 0

My goal is to set up a terminal in which a command-line interface program would behave as expected for the keyboard inputs (the program is written in xharbour originally for Windows but now I would like to port it to linux).
I have chosen xterm to start with as it is simpler, no need for disabling default terminal key combinations.

With putty most of the characters work out well and for those that don’t I use autohotkey, an ahk script and that does the job. For example, for Ctrl+F1:
^F1::SendInput ^[O5P

I tried and modified, recompiled the terminfo, changed it and changed the keyboard types but could not achieve to get a ^[O5P response for pressing Ctrl+F1 in terminal.
If you know any way of doing this change, please tell me… I have read trough hundreds of pages that supposedly do this but all those changes did not made any effect or not the expected effect.

So I left trying to modify the terminal settings to achieve my Ctrl+F1 to ^[O5P goal and tried some commands and programs that would do something similar to autohotkey:

  • xmodmap, but for key combinations it’s not working
  • xdotool windowactivate xyz type ^[O5P, this returns the char codes of individual characters
  • xmacro, it doesn’t send keystrokes to other window
  • ironahk, I get an error right at the start with trying to run the example.ahk and couldn’t find the commands that I wished for in its light manual.
  • bind '\e[1;5P":"\e[O5P"', here the first keycode is what I currently get when typing ctrl+f1 and after the one that I wish to get by this combination. No effect.
  • xbindkeys + xvkbd, didn’t helped either.

Please help me if you already know, managed somehow to achieve this (change the key code returned for a key combination).

I use the latest CentOS and Ubuntu for testing.

  • 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-09T06:18:30+00:00Added an answer on June 9, 2026 at 6:18 am

    xterm can be configured to send custom strings when certain keys are pressed by modifying its translation table. The translation table is part of the X resource database managed by the xrdb command.

    There’s a good example of a customized translation table for xterm here. It can be copied into your $HOME/.Xdefaults or $HOME/.Xresources and it will be loaded the next time you log in. To load it into your current session immediately, xrdb -merge $HOME/.Xresources. This won’t affect any xterms that are already running. (You might be able to change the translation table of a running xterm with editres, but that’s more trouble than it’s worth.)

    To provide a custom translation table for a single instance of xterm, use the -xrm option, as in

    xterm -xrm 'XTerm.VT100.translations: #override Ctrl<Key>Left: string(0x1b) string("b") \n Ctrl<Key>Right: string(0x1b) string("f")'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The goal would be to set the profile the same way as in a
My goal is to set a modal view in my Android application. I would
I want to do auto scaling using knife command line tool. My main goal
In Google Analytics I set a Goal that is a simple URL Destination using
I have the pages that I want to set as a goal in Google
I'm trying to set up integration tests using the AbstractTransactionalJUnit4SpringContextTests base class. My goal
Goal: Once i click on the start button on my user interface, i currently
Goal I am building an Eclipse plugin targeting the 3.7 environment and would like
Goal: read in the current value of a set of text boxes. if the
I have tried to work this RegEx to set up a goal in GA

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.