Operating System - HP-UX
1825730 Members
2710 Online
109687 Solutions
New Discussion

Enabling/Disabling CAPS key in HP-UX Korn Shell program

 
SOLVED
Go to solution
Bala_4
Occasional Advisor

Enabling/Disabling CAPS key in HP-UX Korn Shell program

Hi All

I am trying to automatically enable CAPS key thru my shell program, so that when user inputs, the characters entered will be in CAPITAL Letters, and once he exist the function, the CAPS key should be turned off. I beleive this can be done using "tput" command.

Can anyone help ????

Thanks

Bala
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Enabling/Disabling CAPS key in HP-UX Korn Shell program

Hi Bala:

# stty iuclc

...JRF...
Bala_4
Occasional Advisor

Re: Enabling/Disabling CAPS key in HP-UX Korn Shell program

Hi James

Thanks again.

I tried stty olcuc. Characters are now displayed in CAPS. After that I tired to put it back to normal mode i.e caps off... it doesnot work. I tried stty iuclc

Please help

Thanks
Bala
Bruce Regittko_1
Esteemed Contributor

Re: Enabling/Disabling CAPS key in HP-UX Korn Shell program

Hi,

From the man page for stty,

stty olcuc

will map lowercase characters to uppercase.

stty -olcuc

will turn off this setting.

--Bruce
www.stratech.com/training
James R. Ferguson
Acclaimed Contributor

Re: Enabling/Disabling CAPS key in HP-UX Korn Shell program

Hi Bala:

# stty iuclc # disable CAPS key
# stty -iuclc # (re)enables CAPS key

# stty lcase # echo input & ouput in uppercase
# stty -lcase # reset

See man pages for 'stty'.

...JRF...