Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KDE Connect Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
26
Merge Requests
26
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Network
KDE Connect Android
Commits
6e053a7e
Commit
6e053a7e
authored
Jun 13, 2019
by
Nicolas Fella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide keyboard display action if remote keyboard input is not supported
parent
71b034a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadActivity.java
...e/kdeconnect/Plugins/MousePadPlugin/MousePadActivity.java
+7
-0
src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java
...kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java
+18
-3
No files found.
src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadActivity.java
View file @
6e053a7e
...
...
@@ -173,6 +173,13 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
MenuInflater
inflater
=
getMenuInflater
();
inflater
.
inflate
(
R
.
menu
.
menu_mousepad
,
menu
);
BackgroundService
.
RunWithPlugin
(
this
,
deviceId
,
MousePadPlugin
.
class
,
plugin
->
{
if
(!
plugin
.
isKeyboardEnabled
())
{
menu
.
removeItem
(
R
.
id
.
menu_show_keyboard
);
}
});
return
true
;
}
...
...
src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java
View file @
6e053a7e
...
...
@@ -15,8 +15,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package
org.kde.kdeconnect.Plugins.MousePadPlugin
;
...
...
@@ -36,6 +36,17 @@ public class MousePadPlugin extends Plugin {
//public final static String PACKET_TYPE_MOUSEPAD = "kdeconnect.mousepad";
public
final
static
String
PACKET_TYPE_MOUSEPAD_REQUEST
=
"kdeconnect.mousepad.request"
;
private
final
static
String
PACKET_TYPE_MOUSEPAD_KEYBOARDSTATE
=
"kdeconnect.mousepad.keyboardstate"
;
private
boolean
keyboardEnabled
=
true
;
@Override
public
boolean
onPacketReceived
(
NetworkPacket
np
)
{
keyboardEnabled
=
np
.
getBoolean
(
"state"
,
true
);
return
true
;
}
@Override
public
String
getDisplayName
()
{
...
...
@@ -71,7 +82,7 @@ public class MousePadPlugin extends Plugin {
@Override
public
String
[]
getSupportedPacketTypes
()
{
return
new
String
[
0
]
;
return
new
String
[
]{
PACKET_TYPE_MOUSEPAD_KEYBOARDSTATE
}
;
}
@Override
...
...
@@ -135,4 +146,8 @@ public class MousePadPlugin extends Plugin {
device
.
sendPacket
(
np
);
}
boolean
isKeyboardEnabled
()
{
return
keyboardEnabled
;
}
}
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