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
4241e2ff
Commit
4241e2ff
authored
Nov 16, 2019
by
Evan W. Patton
Committed by
Jeffrey Schiller
Nov 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Ctrl (Windows/Linux) or Cmd (Mac) for multiselect
Change-Id: Icd6fd74d49ae11cbc13a6321112e0cf002308186
parent
85e9e4dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaFormEditor.java
.../appinventor/client/editor/youngandroid/YaFormEditor.java
+9
-7
No files found.
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaFormEditor.java
View file @
4241e2ff
...
...
@@ -53,13 +53,13 @@ import com.google.appinventor.shared.youngandroid.YoungAndroidSourceAnalyzer;
import
com.google.common.base.Preconditions
;
import
com.google.common.collect.Maps
;
import
com.google.gwt.core.client.Callback
;
import
com.google.gwt.event.dom.client.KeyCodes
;
import
com.google.gwt.event.dom.client.KeyDownEvent
;
import
com.google.gwt.event.dom.client.KeyDownHandler
;
import
com.google.gwt.event.dom.client.KeyUpEvent
;
import
com.google.gwt.event.dom.client.KeyUpHandler
;
import
com.google.gwt.user.client.Command
;
import
com.google.gwt.user.client.Window
;
import
com.google.gwt.user.client.Window.Navigator
;
import
com.google.gwt.user.client.ui.DockPanel
;
import
com.google.gwt.user.client.ui.RootPanel
;
...
...
@@ -177,18 +177,20 @@ public final class YaFormEditor extends SimpleEditor implements FormChangeListen
RootPanel
.
get
().
addDomHandler
(
new
KeyDownHandler
()
{
@Override
public
void
onKeyDown
(
KeyDownEvent
event
)
{
int
keyCode
=
event
.
getNativeKeyCode
();
if
(
keyCode
==
KeyCodes
.
KEY_SHIFT
)
{
shouldSelectMultipleComponents
=
true
;
if
(
Navigator
.
getPlatform
().
toLowerCase
().
startsWith
(
"mac"
))
{
shouldSelectMultipleComponents
=
event
.
isMetaKeyDown
();
}
else
{
shouldSelectMultipleComponents
=
event
.
isControlKeyDown
();
}
}
},
KeyDownEvent
.
getType
());
RootPanel
.
get
().
addDomHandler
(
new
KeyUpHandler
()
{
@Override
public
void
onKeyUp
(
KeyUpEvent
event
)
{
int
keyCode
=
event
.
getNativeKeyCode
();
if
(
keyCode
==
KeyCodes
.
KEY_SHIFT
)
{
shouldSelectMultipleComponents
=
false
;
if
(
Navigator
.
getPlatform
().
toLowerCase
().
startsWith
(
"mac"
))
{
shouldSelectMultipleComponents
=
event
.
isMetaKeyDown
();
}
else
{
shouldSelectMultipleComponents
=
event
.
isControlKeyDown
();
}
}
},
KeyUpEvent
.
getType
());
...
...
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