SO - 25114883

by Arun P Johny

HTML

<button>B1</button>
<button>B2</button>
<button>B3</button>
<button>B4</button>

JavaScript

$("body").keypress(function (key) {
    console.log(key.which)
    if (key.which == 39) {
        $("button").hide();
    }
});