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
98c1275d
Commit
98c1275d
authored
11 years ago
by
Solly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #329 from Medical-Insight/fix-shift-chars
Fixes #326: correct handling of shift key
parents
85e89916
f6a1d98a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
keyboard.js
include/keyboard.js
+1
-1
test.helper.js
tests/test.helper.js
+8
-0
No files found.
include/keyboard.js
View file @
98c1275d
...
...
@@ -31,7 +31,7 @@ var kbdUtil = (function() {
function
hasShortcutModifier
(
charModifier
,
currentModifiers
)
{
var
mods
=
{};
for
(
var
key
in
currentModifiers
)
{
if
(
key
!==
0xffe1
)
{
if
(
parseInt
(
key
)
!==
0xffe1
)
{
mods
[
key
]
=
currentModifiers
[
key
];
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/test.helper.js
View file @
98c1275d
...
...
@@ -248,5 +248,13 @@ describe('Helpers', function() {
})).
to
.
be
.
deep
.
equal
([{
keysym
:
keysyms
.
lookup
(
0xffe9
),
type
:
'keydown'
}]);
});
});
describe
(
'do not treat shift as a modifier key'
,
function
()
{
it
(
'should not treat shift as a shortcut modifier'
,
function
()
{
expect
(
kbdUtil
.
hasShortcutModifier
([],
{
0xffe1
:
true
})).
to
.
be
.
false
;
});
it
(
'should not treat shift as a char modifier'
,
function
()
{
expect
(
kbdUtil
.
hasCharModifier
([],
{
0xffe1
:
true
})).
to
.
be
.
false
;
});
});
});
});
This diff is collapsed.
Click to expand it.
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