The NumLock Obstacle



  • I was working on a client's site, trying to get it finished up for launch. We sent our final version, and they sent back three changes. The first two were simple changes to the wording of a couple of e-mails, but the third was... Well, I'll let you read it for yourself:

    <font face="Optima" size="3">3)Login
    From testing here in our office, it appears that the login function only works in “NumLock” is not on.  Please change it so that passwords work whether or not “NumLock” is on.</font>



  •  Hehehehe... my condolences.

    This would be a good time to add a PBCAK code to your bug tracking software.



  • I'm trying to think how you can reply to that but I am lost for words. All I can think of is that just because they request it doesn't make the request reasonable or even possible.



  • So, what are they using the keypad for if numlock is off?


  • Newsflash for non-laptop users: numlock will make the right end of the letters turn into digits.
    Also, for the normal numeric keyboard, it becomes cursor keys. So obviously they needed cursor keys!



  • Newsflash for non-motif users: this beautiful peace of crap also known as a library does not let you enter anything if numlock is on!


  • :belt_onion:

    @OzPeter said:

    I'm trying to think how you can reply to that but I am lost for words. All I can think of is that just because they request it doesn't make the request reasonable or even possible.
    I think I would try: "The way Numlock behaves on our login page is the generally accepted way used by all major companies in this industry. Implementing it differently would create an unexpected behaviour for everyone that is used to this standard way (e.g. logging in to Windows)"

    If they don't accept that, I'm afraid you'll need to implement it but make sure you have this request signed on paper so that it won't bite you in the ass in a couple of weeks time.



  • @henke37 said:

    Newsflash for non-laptop users: numlock will make the right end of the letters turn into digits. Also, for the normal numeric keyboard, it becomes cursor keys. So obviously they needed cursor keys!

     Actually on my laptop, I have to push the blue Fn button to use the right half of the keys as the numeric keypad, regardless of whether NumLock is on.  If NumLock is off, it behaves just like a regular keyboard's numeric keypad behaves when NumLock is on.

    YMMV, of course.



  •  Most laptops have a bunch of keys change to numbers when numlock is on. However just as the caps lock key is a cause for password fields to display "CAPS LOCK IS ON" it would be helpful for numlock. HOWEVER the problem is that numlock is a normal thing to have on/off and don't affect passwords, and you can't check if the user is on a laptop without an external keyboard with the numlock on. So... Add a helpful message on top "if you are on a laptop keyboard, please make sure the numlock is disabled before entering your password". The user will be happy, and you will be minus one bug, and headake goes away, and you have a joke to tell as well.If they complain give them the PC for Dummies book.



  • @bjolling said:

    @OzPeter said:
    I'm trying to think how you can reply to that but I am lost for words. All I can think of is that just because they request it doesn't make the request reasonable or even possible.
    I think I would try: "The way Numlock behaves on our login page is the generally accepted way used by all major companies in this industry. Implementing it differently would create an unexpected behaviour for everyone that is used to this standard way (e.g. logging in to Windows)" If they don't accept that, I'm afraid you'll need to implement it but make sure you have this request signed on paper so that it won't bite you in the ass in a couple of weeks time.

     

    The problem with this is that it leads people to think you actually control the character code on the form when in reality you do not.  If you receive a character code for "home" how do you know it was the key on the number pad and not the one on the extra keys, or if you get a "7" how do you know it isn't the top row of a standard keyboard, or for laptops, how do you know that "i" was supposed to be "7" or the "7" was suppose to be "i".  You don't because you don't control this.  Your explaination makes it sound like you do and can simply change this behaviour.

    Better to say that this is a system issue and it works as designed and can not be changed, it is not a software issue or an issue with your form.  Give me garbage and I will process garbage.



  • @KattMan said:

    If you receive a character code for "home" how do you know it was the key on the number pad and not the one on the extra keys, or if you get a "7" how do you know it isn't the top row of a standard keyboard, or for laptops, how do you know that "i" was supposed to be "7" or the "7" was suppose to be "i".

    Err... you know by the scan code.  Even if they translate to the same ASCII in a given keymap, there is a unique scan code per actual physical key.  The information that you seem to believe is not available is, in fact, available.

    @KattMan said:

    Better to say that this is a system issue and it works as designed and can not be changed, it is not a software issue or an issue with your form.  Give me garbage and I will process garbage.

    I think the real problem here is that your knowledge of the design of the system is incomplete, not that the design of the system is incomplete.  Do some googling for "scan codes".



  • @DaveK said:

    I think the real problem here is that your knowledge of the design of the system is incomplete, not that the design of the system is incomplete.  Do some googling for "scan codes".

    No, my problem is how do you explain this to someone else that doesn't know.  This was the question posed.

    When the problem really comes down to intent, how do you know if the user intended for it to be a "7" and not an "i", you can't ever know that, you just simply accept what the user pressed and validate that, you dont second guess the user and change thier input.  Scan code can't help there either.  This is the real problem.  If you do change intent, then suddenly when they switch from a laptop to a regular keyboard, that "i" you just pressed somehow became a "7" when it shouldn't.  The form now is trying to deal with data it does not have, it just isn't the data you think I'm talking about.

    Getting down to scan codes for a user, well, they just glaze over.  You tell them it is a system issue, you can't fix it, it is how things work.



  •  The Real WTF is that some of you think a web form sends along the scan codes for "home" and whatnot when num lock is off.

    Home moves your cursor, it doesn't add the scan code for "home" to the input box.



  • @Heron said:

     The Real WTF is that some of you think a web form sends along the scan codes for "home" and whatnot when num lock is off.

    Home moves your cursor, it doesn't add the scan code for "home" to the input box.

    I'm assuming DaveK is thinking of processing this client side when you can see the scan codes.  The problem with presuming user intent is still there and can not be resolved.


  • :belt_onion:

    @KattMan said:

    When the problem really comes down to intent, how do you know if the user intended for it to be a "7" and not an "i", you can't ever know that, you just simply accept what the user pressed and validate that, you don't second guess the user and change their input.
    Totally agree. But in this particular case I was looking for a way to convince the client that his request was a bad idea. He certainly wasn't a technical user, so I guess he was some kind of PHB. That's why I would use a phrase like "generally accepted way" or "industry best practices" or whatever, trying to speak their lingo.



  • @bjolling said:

    @KattMan said:

    When the problem really comes down to intent, how do you know if the user intended for it to be a "7" and not an "i", you can't ever know that, you just simply accept what the user pressed and validate that, you don't second guess the user and change their input.
    Totally agree. But in this particular case I was looking for a way to convince the client that his request was a bad idea. He certainly wasn't a technical user, so I guess he was some kind of PHB. That's why I would use a phrase like "generally accepted way" or "industry best practices" or whatever, trying to speak their lingo.

    Which as I said, implies that you could change it, but normally you don't because this way is generally accepted.  Really you can't change it, so it is a system standard, you can do nothing about it, there is nothing to fix, it is just how it works.



  • Nobody's suggested the obvious; take the letters (or numbers) received, compare against all laptop keyboard layouts and allow every variant :-)



  • @KattMan said:

    @Heron said:

     The Real WTF is that some of you think a web form sends along the scan codes for "home" and whatnot when num lock is off.

    Home moves your cursor, it doesn't add the scan code for "home" to the input box.

    I'm assuming DaveK is thinking of processing this client side when you can see the scan codes. 

    Yep, of course.

    @KattMan said:

    The problem with presuming user intent is still there and can not be resolved.

    It doesn't need to be presumed or resolved, you just don't need to care at all.  Let the sequence of scan codes be the password string you send to the server.  As long as they press the same physical keys in the same order when logging in as they did when cretating it, Num Lock won't matter!


  • @DaveK said:

    @KattMan said:

    @Heron said:

     The Real WTF is that some of you think a web form sends along the scan codes for "home" and whatnot when num lock is off.

    Home moves your cursor, it doesn't add the scan code for "home" to the input box.

    I'm assuming DaveK is thinking of processing this client side when you can see the scan codes. 

    Yep, of course.

    @KattMan said:

    The problem with presuming user intent is still there and can not be resolved.

    It doesn't need to be presumed or resolved, you just don't need to care at all.  Let the sequence of scan codes be the password string you send to the server.  As long as they press the same physical keys in the same order when logging in as they did when cretating it, Num Lock won't matter!

     

    That's the dumbest damn thing I've ever heard.  What if they hit the f'ing backspace or type it in notepad and copy and paste it.


  • Garbage Person

    @campkev said:

     

    That's the dumbest damn thing I've ever heard.  What if they hit the f'ing backspace or type it in notepad and copy and paste it.

    Or get a new keyboard with a real fucking numpad on it.


  •  I have a couple keyboards on which the function keys can be toggled between normal function keys (F1-F12) and other functions.  Annoyingly, on power-up, they default to the other set.  This is really annoying because F3 (normally used for Find Again) becomes "Redo" and maps to Ctrl-Y.  It becomes even more annoying when running some programs in which Ctrl-Y does something else.

    My computer has a BIOS setting to default Num Lock on or off, but this Fn Lock is new.


  • Garbage Person

    I refuse to use a desktop keyboard with an Fn lock. My F keys are F keys. If you want fucking auxiliary keys,  PUT THEM ON THE FUCKING KEYBOARD. Don't take my fucking keys away from me for that purpose.

    This is particularly irritating to me because the first time I encountered such a keyboard, the PC it was attached to POSTed hella fast and it was almost impossible to be able to to [Fn] [F2] to access the BIOS Setup on that machine as a result.


    On a related note I use every fucking key on my keyboard. STOP FUCKING WITH THEIR LOCATIONS AND EXISTENCE, KEYBOARD MANUFACTURERS! I use the numpad a LOT. I like my numpad. I use the Edit pad (that'll be Insert/Del/Home/End/Pgup/Pgdn) even more than that. In fact, every time I'm in a multiline text entry field, it's almost guaranteed I'll use them at least once. I use my arrow keys just as much and for the same reasons. Text editing doesn't need a fucking mouse. As a programmer, it goes without saying that my Function keys (ALL OF THEM - F1 through F12) have a purpose. So do Break and Printscreen. I even use Scroll Lock. If you don't know what it does, you suck.  Hell, I even use Caps Lock because I LIKE YELLING ON THE INTERNET.



  • @Weng said:

    As a programmer, it goes without saying that my Function keys (ALL OF THEM - F1 through F12) have a purpose.

    But do you use [url=http://msdn.microsoft.com/en-us/library/ms927178.aspx]F13-F24[/url]?


  • Garbage Person

     @Spectre said:

    @Weng said:
    As a programmer, it goes without saying that my Function keys (ALL OF THEM - F1 through F12) have a purpose.

    But do you use F13-F24?

    No, because they haven't been part of any standard microcomputer keyboard layout since before I was fucking born.



  • @campkev said:

    @DaveK said:

    @KattMan said:

    @Heron said:

     The Real WTF is that some of you think a web form sends along the scan codes for "home" and whatnot when num lock is off.

    Home moves your cursor, it doesn't add the scan code for "home" to the input box.

    I'm assuming DaveK is thinking of processing this client side when you can see the scan codes. 

    Yep, of course.

    @KattMan said:

    The problem with presuming user intent is still there and can not be resolved.

    It doesn't need to be presumed or resolved, you just don't need to care at all.  Let the sequence of scan codes be the password string you send to the server.  As long as they press the same physical keys in the same order when logging in as they did when cretating it, Num Lock won't matter!

     

    That's the dumbest damn thing I've ever heard.  What if they hit the f'ing backspace or type it in notepad and copy and paste it.

    Tell them that they can't have that without it breaking the feature they specially requested for num-lock-insensitivity.  Then you ask them if they'd maybe like to submit a feature request for an option to switch between the modes, or maybe for a special version of the code to work each way.  Presto!  Instant job security in troubled times!

     



  • @campkev said:

    @DaveK said:

    @KattMan said:

    The problem with presuming user intent is still there and can not be resolved.

    It doesn't need to be presumed or resolved, you just don't need to care at all.  Let the sequence of scan codes be the password string you send to the server.  As long as they press the same physical keys in the same order when logging in as they did when cretating it, Num Lock won't matter!

     

    That's the dumbest damn thing I've ever heard.  What if they hit the f'ing backspace or type it in notepad and copy and paste it.

    My $0.02... In the days of unix terminals the backspace key just sent ^H to the server, and because of the way the password prompt worked it was sometimes possible to have backspace as a valid character in your password. Re copy+paste, I see a lot of client-side password prompts now are actively blocking pasted-in passwords, which is really annoying.



  • @Weng said:

     @Spectre said:

    @Weng said:
    As a programmer, it goes without saying that my Function keys (ALL OF THEM - F1 through F12) have a purpose.

    But do you use F13-F24?

    No, because they haven't been part of any standard microcomputer keyboard layout since before I was fucking born.

     

    My iMac goes to F19!

    The first thing I did to it was to turn off the equivalent  of the Fn lock so that the F keys would behave themselves. The features (like volume or brightness) are still available by using Fn, and I mapped Expose (etc) to F16-F19.

    I used to have a keyboard that pressing the "volume up" would bring up the "save as" dialogue in Word if you didn't install the crazy drivers that used over 50MB of RAM. (This was the days of Windows 98 and those megabytes were precious)



  • @Zemm said:

    I used to have a keyboard that pressing the "volume up" would bring up the "save as" dialogue in Word if you didn't install the crazy drivers that used over 50MB of RAM. (This was the days of Windows 98 and those megabytes were precious)
     

    The media keys on the front of my laptop (play, pause, stop, volume controls) do funky things in Valve's Source engine games.  E.g. in Counter-Strike Source, pressing the mute key brings up the in-game voice-radio menu, and pressing play/pause brings up the in-game buy menu.  They still control Media Player though, even though CS:S has side effects...

    I haven't really tried them in other games, but I'm sure other games do the same sorts of things.



  • @Heron said:

    The media keys on the front of my laptop (play, pause, stop, volume controls) do funky things in Valve's Source engine games.  E.g. in Counter-Strike Source, pressing the mute key brings up the in-game voice-radio menu, and pressing play/pause brings up the in-game buy menu.  They still control Media Player though, even though CS:S has side effects...
     

    Sometimes the key config have hidden or visible secondary. I had a issue like that once on one of my previous keyboard and setting the key again with that keyboard fixed it.

    I haven't had any problems like that for years though, I always just use my keyboardd volume keys to set the volume ingame.


  • Garbage Person

     @Zemm said:

    My iMac goes to F19!

     

    Okay, okay. I'll admit it. I used to have a keyboard that went to... like, 16 or 19 or 22 or something. I was a Mac user. I was also under the age of 10 and didn't know shit about anything.



  • @dtech said:

     

    I haven't had any problems like that for years though, I always just use my keyboardd volume keys to set the volume ingame.

     

    I think these days some multimedia buttons are more standardised. My laptop with Vol + and - works out of the box under Ubuntu without any fooling around, though Fn-F1 through Fn-F3 should "run user programs" but xev sees nothing.



  • @Zemm said:

    My laptop with Vol + and - works out of the box under Ubuntu without any fooling around,
    Same here with 7.10 (till the hardware buttons died, that is).

    A stupid annoying thing used to happen with the button that toggles the mousepad on or off, though: it turned it on or off just fined, but every time I turned it on, it would also open the GNOME Help app.

    I did a clean install of Ubuntu 8.10 yesterday, but I didn't remember to try if this still happens.



  • @Weng said:

    I even use Scroll Lock. If you don't know what it does, you suck.
     

    What does it do in EditPad?

    It's not a particularly consistently-used key nowadays, bordering on being a completely dead feature, and every single app does something different with it, which in 99%+ of the cases (comparing wikipedia's list with my understanding of the size of the global body of software in existence) is zip nada nothing at all, except for turning on a little light on your keyboard.



  • wow, the author of that book has a pretty clbuttic last name... wonder how many forums he is not allowed to write his name on.


  • Discourse touched me in a no-no place

    @kastein said:

    wow, the author of that book has a pretty clbuttic last name
    The post this was in reply to, had a link to an audio cassette, and the surname is Gookin.

    Perhaps you meant to reply to a different message board?



  • @PJH said:

    @kastein said:
    wow, the author of that book has a pretty clbuttic last name
    The post this was in reply to, had a link to an audio cassette, and the surname is Gookin.

    Perhaps you meant to reply to a different message board?

    I'm going to guess you don't know what ethnicity that "gook" is an slur towards.

    That said, it would be clbuttic if the name was "Vietnamesein" because that's what the clbuttic meme is geared toward.

    I apologize if I offended anybody by pointing out an ethnic slur.  I make no apologies for my ethnic sluts though.



  • @Weng said:

    I even use Scroll Lock. If you don't know what it does, you suck.
     

    Fast Play mode on the PC version of Rogue.  At least that's the only thing I've ever used it for.



  • Lotus notes and Excel both use it.



  • @Nexzus said:

    Lotus notes and Excel both use it.

    Yes, and it confuses 99% of the people who hit scroll-lock by mistake.  Then the helpdesk gets calls like "Excel is acting funny" and it's usually an emergency with some really important spreadsheet that has to go to the stock exchange or printers in 5 minutes.  The lucky person who is able to reach over the user's shoulder and hit the button looks like a god of computers.


Log in to reply