LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 11-29-2004, 08:05 AM   #1
xround
Member
 
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


Hello,
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.

Code:
i=5
while [ $i -ge 0 ]; do
  tput cub1
  echo -n "$i"
  read -n1 -t 1 keypressed <&1
  if [ ! -z "$keypressed" ]; then
    echo "stop"
    break
  fi
  let $[ i -= 1 ]
done
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
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
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?)

Yves.
 
  


Reply


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/Novell 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


All times are GMT -5. The time now is 11:19 PM.

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