Bug 205059

Summary: Feature Request: "Caps lock is enabled" warning in password setting of users/root
Product: [openSUSE] openSUSE 10.2 Reporter: Thomas Meindl <twm.mst>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: andreas.hanke, jsuchome, locilka
Version: Alpha 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screen shot

Description Thomas Meindl 2006-09-12 07:41:58 UTC
By installing alpha4 I entered the passwords for root and the user, but i didn't recognize that I accidently activated the caps lock key. Therefore I couldn't log in untill I realized this. 
Therefore it would be helpful to have a message while entering the passwords in yast, if caps lock is on. E.g. if one locks the screen in KDE, the login screen will prompt that you write only capital letters.

Kind regards,
Tom

PS: alpha4 is really good!
Comment 1 Thomas Fehr 2006-09-14 15:20:44 UTC
Reassigend to maintainer of yast2-users.
Comment 2 Jiří Suchomel 2006-09-15 06:35:44 UTC
How could I know such information? Stefan?
Comment 3 Stefan Hundhammer 2006-09-15 11:07:42 UTC
I just checked if "xset" or "stty" can deliver that information, but it doesn't look very much like it.

If all else fails, we can add an UI built-in (or extend the "GetDisplayInfo()" map) that returns that information. In Qt, that should be pretty simple. For NCurses I don't know, though.
Comment 4 Stefan Dirsch 2006-09-18 04:00:28 UTC
Not sure, if this helps, but one of these KDE applets you can add to the panel shows such informations, which special keys are currently pressed.
Comment 5 Jiří Suchomel 2006-09-18 06:05:50 UTC
Stefan, could you make some function in Qt interface for this?
Comment 6 Stefan Hundhammer 2006-09-19 14:23:47 UTC
Will do.
Comment 7 Jiří Suchomel 2006-09-22 07:18:56 UTC
So return back to me when it is ready.
Comment 8 Stefan Hundhammer 2006-09-26 16:06:04 UTC
Intermediate update:

Qt does not seem to propagate the status of the CapsLock button. It's there in the low-level event (use "xev" and watch the "status" flags change as CapsLock is active and inactive), but Qt does not seem to include it in its QKeyEvent::status() flags.

Will continue to investigate.
Comment 9 Stefan Hundhammer 2006-09-29 15:59:19 UTC
It was a bit tricker than I had thought: I had to use some really low-level Qt functions to get access to low-level X11 events to catch this.

Now it works completely transparantly (in the Qt UI):

If you enter a password field when CapsLock is enabled or if you hit CapsLock in a password field, the label (the caption) of that password field is automatically replaced with "CapsLock!" (intentionally very short so it fits into the remaining space in real-life dialogs). When you turn CapsLock off again or when you leave the password field, the normal label of the password field is restored.

Jiri: Nothing left to do for you. It works automatically.
Comment 10 Stefan Hundhammer 2006-09-29 15:59:50 UTC
Created attachment 99953 [details]
screen shot
Comment 11 Jiří Suchomel 2006-10-02 06:29:36 UTC
Wouldn't it be better to not replace the password field label but show a string (configurable - pure "CapsLock!" looks a bit short to me) under the password fields - the way it is done in kdm? To be sure it won't break a dialg layout, the info could be provided by some UI poll function and ycp code would decide itself where to place it.