Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-29-2004, 08:05 AM   #1
Registered: Oct 2003
Location: France
Distribution: RH9
Posts: 84

Rep: Reputation: 15
how to have no interpretation of special characters (ctrl, tab ...) in a script

does anyone know how to disable interpretaion of special characters in a script ?
I would like to get a script that breaks whenever I press any key of the keyboard, for say during 5 seconds.
I have the following script.

while [ $i -ge 0 ]; do
  tput cub1
  echo -n "$i"
  read -n1 -t 1 keypressed <&1
  if [ ! -z "$keypressed" ]; then
    echo "stop"
  let $[ i -= 1 ]
It is ok when I press alphanumeric keys, but it doesn't work for keys like "tab" key or "ctrl" key.
Any help will be very appreciated.

Thanks, xround
Old 11-29-2004, 08:21 AM   #2
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
The keys you describe are configured as Modifiers in your X configuration. Reconfiguring the keyboard so that they are not modifiers anymore is the only clean solution I see.
I think this reconfiguration can be done on a per-application basis using xmodmap (or is it something else?)



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Special Characters SimeonV SUSE / openSUSE 14 07-07-2006 02:29 PM
special characters greenbox Linux - Software 9 12-23-2005 08:33 PM
FC 4. Modify ALT+TAB behaviour to CTRL+TAB xtracto Linux - Software 1 09-22-2005 03:06 PM
Special characters consty Programming 3 08-07-2005 06:53 AM
changing the function of ctrl and tab kopite Slackware 1 11-26-2003 02:30 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration