# Can we write in UPPERCASE while caps Lock is off?

**URL:** <https://forum.kirupa.com/t/can-we-write-in-uppercase-while-caps-lock-is-off/290771>\
**Category:** Uncategorized\
**Created:** [June 19, 2009, 11:35am UTC](https://forum.kirupa.com/t/can-we-write-in-uppercase-while-caps-lock-is-off/290771 "2009-06-19T11:35:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gyan\_Singh](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@Gyan\_Singh](https://forum.kirupa.com/u/Gyan_Singh)\
**Post date:** [June 19, 2009, 11:35am UTC](https://forum.kirupa.com/t/can-we-write-in-uppercase-while-caps-lock-is-off/290771/1 "2009-06-19T11:35:57Z")

</div>

HI friends,  
I am making a quiz.  
user will give answer in input text field, so i wrote like this,

```auto
submitBtn.addEventListener (MouseEvent.CLICK, q3);

function q3 (evt:MouseEvent):void {
    var ans3T:String;
    ans3T = inputTxt.text;

    if (ans3T == "gyan")
    {
        trace ("correct answer");
    } else
    {
        trace ("wrong answer");
    }
}

```

but problem is if user type Gyan or GYAN, it will say wrong so  
how can i fix this problem,  
can we write in UPPERCASE while caps Lock is off,  
or  
can we restrict UPPERCASE in input text Field ??
