Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
f1e6daf3
Commit
f1e6daf3
authored
Mar 12, 2014
by
Samuel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #348 from Medical-Insight/fix-altgr-firefox
Fix altgr firefox
parents
c70000ba
23078406
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
keyboard.js
include/keyboard.js
+9
-6
No files found.
include/keyboard.js
View file @
f1e6daf3
...
@@ -18,13 +18,13 @@ var kbdUtil = (function() {
...
@@ -18,13 +18,13 @@ var kbdUtil = (function() {
};
};
function
isMac
()
{
function
isMac
()
{
return
navigator
&&
!!
(
/mac
intosh/i
).
exec
(
navigator
.
appVersion
);
return
navigator
&&
!!
(
/mac
/i
).
exec
(
navigator
.
platform
);
}
}
function
isWindows
()
{
function
isWindows
()
{
return
navigator
&&
!!
(
/win
dows/i
).
exec
(
navigator
.
appVersion
);
return
navigator
&&
!!
(
/win
/i
).
exec
(
navigator
.
platform
);
}
}
function
isLinux
()
{
function
isLinux
()
{
return
navigator
&&
!!
(
/linux/i
).
exec
(
navigator
.
appVersion
);
return
navigator
&&
!!
(
/linux/i
).
exec
(
navigator
.
platform
);
}
}
// Return true if a modifier which is not the specified char modifier (and is not shift) is down
// Return true if a modifier which is not the specified char modifier (and is not shift) is down
...
@@ -152,12 +152,15 @@ var kbdUtil = (function() {
...
@@ -152,12 +152,15 @@ var kbdUtil = (function() {
// Get a key ID from a keyboard event
// Get a key ID from a keyboard event
// May be a string or an integer depending on the available properties
// May be a string or an integer depending on the available properties
function
getKey
(
evt
){
function
getKey
(
evt
){
if
(
evt
.
key
)
{
if
(
'keyCode'
in
evt
&&
'key'
in
evt
)
{
return
evt
.
key
;
return
evt
.
key
+
':'
+
evt
.
keyCode
;
}
}
else
{
else
if
(
'keyCode'
in
evt
)
{
return
evt
.
keyCode
;
return
evt
.
keyCode
;
}
}
else
{
return
evt
.
key
;
}
}
}
// Get the most reliable keysym value we can get from a key event
// Get the most reliable keysym value we can get from a key event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment