Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-19-2013, 06:41 AM   #1
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 06:42 AM.
Old 02-19-2013, 07:45 AM   #2
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, 09:42 AM   #3
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
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.


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 07:09 AM
shift+End and Shift+Home key combo doesn't work right santana Linux - Hardware 6 04-23-2010 11:35 AM
keyboard broken, constantly pressed shift key gothicbob Linux - Hardware 4 03-16-2008 09:57 PM
Left Shift key on keyboard fails intermittently WHY?!?! LaidBackWebSage Linux - Hardware 5 09-01-2004 03:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:30 PM.

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