LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   implementation of shift key on keyboard in shell scrpting (https://www.linuxquestions.org/questions/linux-newbie-8/implementation-of-shift-key-on-keyboard-in-shell-scrpting-4175450778/)

ngeeta 02-19-2013 06:41 AM

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

restaurantebucuresti 02-19-2013 07:45 AM

I'm trying to do this since last week...does somebody know how?

jpollard 02-19-2013 09:42 AM

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.


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