Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using centos linux 6.4 desktop ( minimal desktop ) i am looking for a solution so that when i press the number '7' on my keyboard..

it will insert a string rather than '7'...

the numbers on the right side of my keyboard are never used.
i need to make them become strings so i can use them to speed things up.

is there a software, or a program ? that can help me customize my keyboard?
share|improve this question

migrated from Jun 6 '13 at 9:19

This question came from our site for professional and enthusiast programmers.

This is off-topic for SO, which is for questions about programming. You probably want to ask on – Ex Umbris Jun 6 '13 at 4:29
A CentOS question is likely to get closed with prejudice there as well. would seem more suitable. However, because keyboard handling differs widely depending on your environment, it would be a good idea to also add information about which desktop environment (if any) you are using, or if you are only connecting via SSH, for example, then say that. – tripleee Jun 6 '13 at 8:58
  1. Install xvkbd.

  2. Create a script similar to this:


sleep 0.5
xvkbd -text "some string"

You may want to adjust the sleep 0.5 but if you leave it out the key being pressed will impede the input of the whole string.

  1. Create a keyboard shortcut to launch the script. Note that if you have the script inside your home folder you will have to hard-code it as bash /home/USER/folder/, bash ~/folder/ won't work (at least it's like that in Ubuntu-based distros). "7" on the numeric keypad should be "KP_Home" so there should be no conflict with the input of the number 7.

This setup works for me on Linux Mint.

share|improve this answer

You must log in to answer this question.