How to prevent users from writing with the lid closed?

I don't like the people who write caps lock. In addition, this disgust, it cancels the entire application. I am wondering how to prevent users from writing all characters with blocking caps. I cannot make all text have lowercase letters due to special names and abbreviations. What logic should I use?

+7
source share
3 answers

Politely refuse your messages, explaining why - if the number of capital letters exceeds the number of letters in lower case by more than 30, say.

Do not implement this on the FORTRAN forum

+9
source

You can check how many words are uppercase in a word, and then limit it. Someone above gave an example of such names as "McLaren", so this will allow. bottom side, if you put a maximum of 3, "LOL" will be possible. The path to success was to take the word "McLaren" to 7 and then limit it to a percentage of 20%, which allows longer words to have more uppercase characters, but not all caps. (Nothing can completely prevent this, but it will complicate them.)

Fun fact, today is International Blocking Day. :)

+3
source
keypress: function(e) { var ev = e ? e : window.event; if (!ev) { return; } var targ = ev.target ? ev.target : ev.srcElement; // get key pressed var which = -1; if (ev.which) { which = ev.which; } else if (ev.keyCode) { which = ev.keyCode; } // get shift status var shift_status = false; if (ev.shiftKey) { shift_status = ev.shiftKey; } else if (ev.modifiers) { shift_status = !!(ev.modifiers & 4); } // At this point, you have the ASCII code in "which", // and shift_status is true if the shift key is pressed } 

Source - http://24ways.org/2007/capturing-caps-lock

0
source

All Articles