Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
ba120fc7
Commit
ba120fc7
authored
Dec 14, 2017
by
ColinTree
Committed by
Evan W. Patton
Dec 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type editor trying to show some special keys (#1007)
Fix #1006
parent
8a6191fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
appinventor/blocklyeditor/src/typeblock.js
appinventor/blocklyeditor/src/typeblock.js
+27
-1
No files found.
appinventor/blocklyeditor/src/typeblock.js
View file @
ba120fc7
...
...
@@ -141,7 +141,6 @@ Blockly.TypeBlock.prototype.handleKey = function(e){
// Don't steal input from Blockly fields.
if
(
e
.
target
!=
this
.
ac_
.
getTarget
()
&&
(
e
.
target
.
tagName
==
'
INPUT
'
||
e
.
target
.
tagName
==
'
TEXTAREA
'
))
return
;
if
(
e
.
altKey
||
e
.
ctrlKey
||
e
.
metaKey
||
e
.
keyCode
===
9
)
return
;
// 9 is tab
//We need to duplicate delete handling here from blockly.js
if
(
e
.
keyCode
===
8
||
e
.
keyCode
===
46
)
{
// Delete or backspace.
...
...
@@ -159,6 +158,33 @@ Blockly.TypeBlock.prototype.handleKey = function(e){
Blockly
.
mainWorkspace
.
hideChaff
();
return
;
}
switch
(
e
.
keyCode
)
{
case
9
:
// Tab
case
16
:
// Enter
case
17
:
// Ctrl
case
18
:
// Alt
case
19
:
// Home
case
20
:
// Caps Lock
case
33
:
// PageUp
case
34
:
// PageDown
case
35
:
// Shift
case
36
:
// End
case
45
:
// Ins
case
91
:
// Meta
case
112
:
// F1
case
113
:
// F2
case
114
:
// F3
case
115
:
// F4
case
116
:
// F5
case
117
:
// F6
case
118
:
// F7
case
119
:
// F8
case
120
:
// F9
case
121
:
// F10
case
122
:
// F11
case
123
:
// F12
return
;
}
if
(
goog
.
style
.
isElementShown
(
goog
.
dom
.
getElement
(
this
.
typeBlockDiv_
)))
{
// Enter in the panel makes it select an option
if
(
e
.
keyCode
===
13
)
{
...
...
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