mirror of
https://github.com/Ylianst/MeshCommander
synced 2025-12-05 21:53:19 +00:00
Fix minus and OS keys
This commit is contained in:
@@ -31,7 +31,6 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||||||
obj.debugmode = 0;
|
obj.debugmode = 0;
|
||||||
obj.firstUpKeys = [];
|
obj.firstUpKeys = [];
|
||||||
obj.stopInput = false;
|
obj.stopInput = false;
|
||||||
obj.localKeyMap = true;
|
|
||||||
obj.altPressed = false;
|
obj.altPressed = false;
|
||||||
obj.ctrlPressed = false;
|
obj.ctrlPressed = false;
|
||||||
obj.shiftPressed = false;
|
obj.shiftPressed = false;
|
||||||
@@ -401,7 +400,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||||||
obj.SendKeyMsg = function (action, event) {
|
obj.SendKeyMsg = function (action, event) {
|
||||||
if (action == null) return;
|
if (action == null) return;
|
||||||
if (!event) { event = window.event; }
|
if (!event) { event = window.event; }
|
||||||
if (event.code && (obj.localKeyMap == false)) {
|
if (event.code) {
|
||||||
// Convert "event.code" into a scancode. This works the same regardless of the keyboard language.
|
// Convert "event.code" into a scancode. This works the same regardless of the keyboard language.
|
||||||
// Older browsers will not support this.
|
// Older browsers will not support this.
|
||||||
var kc = convertKeyCode(event);
|
var kc = convertKeyCode(event);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
obj.useRLE = true;
|
obj.useRLE = true;
|
||||||
obj.showmouse = true;
|
obj.showmouse = true;
|
||||||
obj.buttonmask = 0;
|
obj.buttonmask = 0;
|
||||||
obj.localKeyMap = true;
|
|
||||||
obj.spare = null;
|
obj.spare = null;
|
||||||
obj.sparew = 0;
|
obj.sparew = 0;
|
||||||
obj.spareh = 0;
|
obj.spareh = 0;
|
||||||
@@ -751,7 +750,7 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
function _keyevent(d, e) {
|
function _keyevent(d, e) {
|
||||||
if (!e) { e = window.event; }
|
if (!e) { e = window.event; }
|
||||||
|
|
||||||
if (e.code && (obj.localKeyMap == false)) {
|
if (e.code) {
|
||||||
// For new browsers, this mapping is keyboard language independent
|
// For new browsers, this mapping is keyboard language independent
|
||||||
var k = convertAmtKeyCode(e);
|
var k = convertAmtKeyCode(e);
|
||||||
if (k != null) { obj.sendkey(k, d); }
|
if (k != null) { obj.sendkey(k, d); }
|
||||||
@@ -783,6 +782,7 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||||||
if (k == 109) kk = 45; // Pad -
|
if (k == 109) kk = 45; // Pad -
|
||||||
if (k == 110) kk = 46; // Pad .
|
if (k == 110) kk = 46; // Pad .
|
||||||
if (k == 111) kk = 47; // Pad /
|
if (k == 111) kk = 47; // Pad /
|
||||||
|
if (k == 173) kk = 45; // - (Number row)
|
||||||
if (k == 186) kk = 59; // ;
|
if (k == 186) kk = 59; // ;
|
||||||
if (k == 187) kk = 61; // =
|
if (k == 187) kk = 61; // =
|
||||||
if (k == 188) kk = 44; // ,
|
if (k == 188) kk = 44; // ,
|
||||||
|
|||||||
Reference in New Issue
Block a user