Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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 askubuntu.com –  Ex Umbris Jun 6 '13 at 4:29
1  
A CentOS question is likely to get closed with prejudice there as well. unix.stackexchange.com 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
add comment

1 Answer 1

  1. Install xvkbd.

  2. Create a script similar to this:

#

#!/bin/bash
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/script.sh, bash ~/folder/script.sh 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.