2019-07-13 09:07:41 +09:00

20 lines
333 B
JavaScript

function Keyboard () {
this.is_down = {}
this.key_up = function (e) {
}
this.key_down = function (e) {
ronin.keyboard.is_down[e.key] = true
if (ronin.commander.is_focused() && e.key == 'Enter') {
e.preventDefault()
ronin.commander.validate()
}
if (ronin.commander.is_focused()) {
}
}
}