// ==UserScript==
// @name                Vimenizer
// @namespace           http://www.elvismontero.com/greasemonkeyhacks/
// @description         Script that adds motional keyboard mappings a la Vim to the web.
// @include             http://*
// @include             https://*
// ==/UserScript==

function captureKeyPress(event){
    if(!event)
        event = window.event;
    var unicode = event.charCode ? event.charCode : event.keyCode;
    var actualkey = String.fromCharCode(unicode);

    if (actualkey == "j")
        window.scrollByLines(20);
    else if (actualkey == "k")
        window.scrollByLines(-20);

}
window.addEventListener("keypress", captureKeyPress, true);
