DooDoo
DooDoo

Reputation: 13447

How to set combination of key codes in javascript

I use this code for replacing Enter key with TAB key :

function EnterTab() { if (event.keyCode == 13) event.keyCode = 9; return false; }

I want to know what can I do if I want replace right arrow key with SHIFT + TAB?

Upvotes: 0

Views: 1130

Answers (1)

Derek 朕會功夫
Derek 朕會功夫

Reputation: 94319

if(event.keyCode == 39){
    event.shiftKey = true;
    event.keyCode = 9;
    return false;
}

Upvotes: 2

Related Questions