LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2013, 07:41 AM   #1
ngeeta
LQ Newbie
 
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
implementation of shift key on keyboard in shell scrpting


Hi ..

I would like to use the shiftkey on the keyboard to be implemented with the linux command ..
Finally i want to implement in the shell script.
My application is like this,

type imenu on console , it goes to screen of multiple options , then select item on which cursor is highlighted ..through shift+<corresponding character>

How can i acheive this in linux on command prompt..

Last edited by ngeeta; 02-19-2013 at 07:42 AM.
 
Old 02-19-2013, 08:45 AM   #2
restaurantebucuresti
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
I'm trying to do this since last week...does somebody know how?
 
Old 02-19-2013, 10:42 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
You do realize that the "shift" key is just a modifier, right?

You hold the shift key down to modify the other key. Usually there are two options. The alphabetic keys are Upper case (shift key down), or lower case (shift key up). This action can be reversed - by using the "caps lock" key.

The only other thing you likely overlooked is that the terminal is buffered. It doesn't send a buffer to the application unless it sees a line end. For shell scripts, you can turn that off using the "stty" utility.

Just remember to turn it back on before the script exits (for any reason) or suddenly you won't be able to type commands very well.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shift key of my keyboard wont work attockonian Linux - Hardware 7 09-09-2010 08:09 AM
shift+End and Shift+Home key combo doesn't work right santana Linux - Hardware 6 04-23-2010 12:35 PM
keyboard broken, constantly pressed shift key gothicbob Linux - Hardware 4 03-16-2008 10:57 PM
Left Shift key on keyboard fails intermittently WHY?!?! LaidBackWebSage Linux - Hardware 5 09-01-2004 04:39 PM


All times are GMT -5. The time now is 07:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration