Improvements to the keyboard.
Add a number pad to the keyboard. Make it hidden by default for RLG-Web.
This commit is contained in:
parent
9ddc3c685c
commit
2ab0de0799
6 changed files with 59 additions and 6 deletions
|
|
@ -260,6 +260,10 @@ var charshifts = { '-': "5f", '=': "2b", '[': "7b", ']': "7d", '\\': "7c",
|
|||
';': "3a", '\'': "22", ',': "3c", '.': "3e", '/': "3f", '`': "7e"
|
||||
}
|
||||
|
||||
var kpkeys = { "KP1": "1b4f46", "KP2": "1b4f42", "KP3": "1b5b367e",
|
||||
"KP4": "1b4f44", "KP5": "1b5b45", "KP6": "1b4f43",
|
||||
"KP7": "1b4f48", "KP8": "1b4f41", "KP9": "1b5b357e" };
|
||||
|
||||
function vkey(c) {
|
||||
var keystr;
|
||||
if (c.match(/^[a-z]$/)) {
|
||||
|
|
@ -294,6 +298,9 @@ function vkey(c) {
|
|||
else
|
||||
keystr = c.charCodeAt(0).toString(16);
|
||||
}
|
||||
else if (c in kpkeys) {
|
||||
keystr = kpkeys[c];
|
||||
}
|
||||
else
|
||||
return;
|
||||
//writeData("Sending " + keystr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue