diff --git a/index.js b/index.js index 3571abf..8bfbc66 100644 --- a/index.js +++ b/index.js @@ -229,6 +229,15 @@ function emitKey(stream, s) { key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); key.ctrl = true; + } else if (s.length === 1 && s >= '0' && s <= '9') { + // number + key.name = s; + + } else if (s.length === 1 && '~!@#$%^&*()_+'.indexOf(s) !== -1) { + // shift+number + key.name = s; + key.shift = true; + } else if (s.length === 1 && s >= 'a' && s <= 'z') { // lowercase letter key.name = s;