When you're designated as your family's official internet support technician, you find that what someone perceives as the biggest web-based WTF often turns out to be something that's relatively easy to dismiss being attributable to poorly designed or misleading UI.

However, once in a while, something truly special crosses your path, much like when Wladimir Palant's father asked him to look into some weirdness on his online banking login page. As it turned out, the Bank of Scotland invented some very creative keyboard input validation:

document.onkeydown = disablekeyboardnavigation;

function disablekeyboardnavigation(e) {
    if (navigator.appName == 'Microsoft Internet Explorer') {
        if (event.keyCode == 8)
        {
            if ((event.keyCode == 8) && (event.srcElement.tagName != "INPUT"))
            {
                if (event.srcElement.tagName != "TEXTAREA")
                return false;
            }
        }
        if ((event.keyCode == 13) && (event.srcElement.tagName == "INPUT"))
        {
            return false;
        }
    }
    else if (navigator.appName == 'Netscape')
    {
        
        if (e.which == 93 || e.which == 0 || e.which == 3 || ((e.which ==    37 || e.which == 39) && e.altKey) || (e.which == 82 && e.ctrlKey )) {
            alert("Keyboard Navigation Disabled.");
            return false;
        }
        if ((e.which == 117) && e.shiftKey) {            
            return false;
        }
    }

    if  (navigator.appName == "Microsoft Internet Explorer")
    {
        
        if ((event.altKey) && (event.srcElement.tagName == "INPUT")) {
        }
        if ((event.keyCode == 96) || (event.keyCode == 97) || (event.keyCode == 98)) {
        }
        if (event.keyCode == 93  || event.keyCode == 116
            || event.keyCode == 122 || (event.keyCode == 121 && event.shiftKey)
                || ((event.keyCode == 36 || event.keyCode == 37 || event.keyCode == 39)
                    && event.altKey) || ((event.keyCode == 82 || event.keyCode == 78) && event.ctrlKey)
                            || (event.keyCode == 122 && event.shiftKey))
        {
            if (event.keyCode == 116 || event.keyCode == 121 || event.keyCode == 122)
            {
                event.keyCode = 0;
            }

            if((event.keyCode != 93) || (event.keyCode == 93 && event.srcElement.tagName != "INPUT"))
            {
                alert("Der gewählte Vorgang kann nicht ausgeführt werden. Bitte benutzen Sie die Navigation in Ihrem Onlinebanking-Bereich.");
                return false;
            }
        }
        if (event.keyCode == 18 && event.keyCode == 8
            && event.srcElement.tagName != "INPUT" && event.srcElement.tagName != "TEXTAREA") {
            alert("Der gewählte Vorgang kann nicht ausgeführt werden. Bitte benutzen Sie die Navigation in Ihrem Onlinebanking-Bereich.");
            return false;
        }
    }

    return true;

The jury's still out as to whether or not this contributes to the overall quality of the site, but rest assured Netscape fans, you are not forgotten.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!