Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
37b5a08f
Unverified
Commit
37b5a08f
authored
Jul 04, 2022
by
RustDesk
Committed by
GitHub
Jul 04, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #915 from Heap-Hop/master
Fix physical keyboard
parents
82e8ab90
2f21661b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
AndroidManifest.xml
flutter/android/app/src/main/AndroidManifest.xml
+1
-1
model.dart
flutter/lib/models/model.dart
+11
-7
remote_page.dart
flutter/lib/pages/remote_page.dart
+6
-2
No files found.
flutter/android/app/src/main/AndroidManifest.xml
View file @
37b5a08f
...
...
@@ -43,7 +43,7 @@
<activity
android:name=
".MainActivity"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode
|navigation
"
android:exported=
"true"
android:hardwareAccelerated=
"true"
android:launchMode=
"singleTop"
...
...
flutter/lib/models/model.dart
View file @
37b5a08f
...
...
@@ -724,13 +724,17 @@ class FFI {
static
void
inputKey
(
String
name
,
{
bool
?
down
,
bool
?
press
})
{
if
(!
ffiModel
.
keyboard
())
return
;
setByName
(
'input_key'
,
json
.
encode
(
modify
({
'name'
:
name
,
'down'
:
(
down
??
false
).
toString
(),
'press'
:
(
press
??
true
).
toString
()
})));
final
Map
<
String
,
String
>
out
=
Map
();
out
[
'name'
]
=
name
;
// default: down = false
if
(
down
==
true
)
{
out
[
'down'
]
=
"true"
;
}
// default: press = true
if
(
press
!=
false
)
{
out
[
'press'
]
=
"true"
;
}
setByName
(
'input_key'
,
json
.
encode
(
modify
(
out
)));
}
static
void
moveMouse
(
double
x
,
double
y
)
{
...
...
flutter/lib/pages/remote_page.dart
View file @
37b5a08f
...
...
@@ -343,9 +343,14 @@ class _RemotePageState extends State<RemotePage> {
onKey:
(
data
,
e
)
{
final
key
=
e
.
logicalKey
;
if
(
e
is
RawKeyDownEvent
)
{
if
(
e
.
repeat
)
{
if
(
e
.
repeat
&&
!
e
.
isAltPressed
&&
!
e
.
isControlPressed
&&
!
e
.
isShiftPressed
&&
!
e
.
isMetaPressed
)
{
sendRawKey
(
e
,
press:
true
);
}
else
{
sendRawKey
(
e
,
down:
true
);
if
(
e
.
isAltPressed
&&
!
FFI
.
alt
)
{
FFI
.
alt
=
true
;
}
else
if
(
e
.
isControlPressed
&&
!
FFI
.
ctrl
)
{
...
...
@@ -355,7 +360,6 @@ class _RemotePageState extends State<RemotePage> {
}
else
if
(
e
.
isMetaPressed
&&
!
FFI
.
command
)
{
FFI
.
command
=
true
;
}
sendRawKey
(
e
,
down:
true
);
}
}
// [!_showEdit] workaround for soft-keyboard's control_key like Backspace / Enter
...
...
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