mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-01 19:35:46 +01:00
Fix some key processing glitchiness. Closes issue #730.
This commit is contained in:
@@ -952,6 +952,7 @@ var DOM = Class("DOM", {
|
|||||||
pass: ["Pass"],
|
pass: ["Pass"],
|
||||||
return: ["Return", "CR", "Enter"],
|
return: ["Return", "CR", "Enter"],
|
||||||
right_shift: [">"],
|
right_shift: [">"],
|
||||||
|
slash: ["/"],
|
||||||
space: ["Space", " "],
|
space: ["Space", " "],
|
||||||
subtract: ["Minus", "Subtract"]
|
subtract: ["Minus", "Subtract"]
|
||||||
};
|
};
|
||||||
@@ -1178,7 +1179,7 @@ var DOM = Class("DOM", {
|
|||||||
else
|
else
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
|
|
||||||
if (!modifier && /^[a-z0-9]$/i.test(key))
|
if (!modifier && key.length == 1)
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1209,10 +1210,10 @@ var DOM = Class("DOM", {
|
|||||||
key = String.fromCharCode(charCode + 64);
|
key = String.fromCharCode(charCode + 64);
|
||||||
}
|
}
|
||||||
// a normal key like a, b, c, 0, etc.
|
// a normal key like a, b, c, 0, etc.
|
||||||
else if (charCode > 0) {
|
else if (charCode) {
|
||||||
key = String.fromCharCode(charCode);
|
key = String.fromCharCode(charCode);
|
||||||
|
|
||||||
if (!/^[a-z0-9]$/i.test(key) && key in this.key_code) {
|
if (!/^[^<\s]$/i.test(key) && key in this.key_code) {
|
||||||
// a named charCode key (<Space> and <lt>) space can be shifted, <lt> must be forced
|
// a named charCode key (<Space> and <lt>) space can be shifted, <lt> must be forced
|
||||||
if ((key.match(/^\s$/) && event.shiftKey) || event.dactylShift)
|
if ((key.match(/^\s$/) && event.shiftKey) || event.dactylShift)
|
||||||
modifier += "S-";
|
modifier += "S-";
|
||||||
|
|||||||
Reference in New Issue
Block a user