Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Caps Lock On/Off

    I need to check that Caps Lock is on/off. When caps lock key pressed then I got it through "keyDown" handler but I haven't found that Caps Lock is On/Off.



    Please suggest us that how to find that Caps Lock is on/off.


    Thanks.

    #2
    The only way to do this is to use Page.registerKey() to globally capture keyPress events and look for Caps Lock, but this will not tell you if Caps Lock was already down when the page was loaded.

    Comment


      #3
      I m using Page.registerKey() but i have not done my work.

      I have one dynamic form which have one TextItem and PasswordItem.

      When user getting focus on TextItem or PasswordItem and press caps_lock ON than i want to show caps_lock ON warning .

      Please suggest how to do this on KeyPressHandler or focusHandler?

      Comment


        #4
        So again, the API you would use is Page.registerKey() and you can refer to the docs for how it works. However as previously explained the approach is unreliably so we don't recommend it. What is more typical is just to remind the user that the caps lock key may be down if the user gets his password wrong.

        Comment

        Working...
        X