Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Mobile
Commits
f8a7c1e4
Commit
f8a7c1e4
authored
Feb 16, 2022
by
Devin Lin
🎨
Browse files
quicksettings: Add vkbd toggle quicksetting
parent
0cf909d5
Pipeline
#138816
passed with stages
in 1 minute and 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
quicksettings/CMakeLists.txt
View file @
f8a7c1e4
...
...
@@ -3,5 +3,6 @@
plasma_install_package
(
airplanemode org.kde.plasma.airplanemode quicksettings
)
plasma_install_package
(
caffeine org.kde.plasma.caffeine quicksettings
)
plasma_install_package
(
keyboardtoggle org.kde.plasma.keyboardtoggle quicksettings
)
add_subdirectory
(
nightcolor
)
add_subdirectory
(
powermenu
)
quicksettings/keyboardtoggle/contents/ui/main.qml
0 → 100644
View file @
f8a7c1e4
/*
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
* SPDX-License-Identifier: GPL-2.0-or-later
*/
import
org
.
kde
.
plasma
.
private
.
mobileshell
1.0
as
MobileShell
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
workspace
.
keyboardlayout
1.0
as
Keyboards
MobileShell.QuickSetting
{
text
:
i18n
(
"
Virtual Keyboard
"
)
icon
:
"
input-keyboard-virtual
"
status
:
enabled
?
i18n
(
"
On
"
)
:
(
Keyboards
.
KWinVirtualKeyboard
.
available
?
i18n
(
"
Off
"
)
:
i18n
(
"
Tap to open settings
"
))
enabled
:
Keyboards
.
KWinVirtualKeyboard
.
enabled
&&
Keyboards
.
KWinVirtualKeyboard
.
available
settingsCommand
:
"
plasma-open-settings kcm_mobile_onscreenkeyboard
"
function
toggle
()
{
if
(
!
Keyboards
.
KWinVirtualKeyboard
.
available
)
{
// select a keyboard in the settings (none is likely set)
MobileShell
.
ShellUtil
.
executeCommand
(
"
plasma-open-settings kcm_virtualkeyboard
"
);
}
else
{
Keyboards
.
KWinVirtualKeyboard
.
enabled
=
!
enabled
;
}
}
}
quicksettings/keyboardtoggle/metadata.desktop
0 → 100644
View file @
f8a7c1e4
# SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
# SPDX-License-Identifier: GPL-2.0-or-later
[Desktop Entry]
Name=Virtual Keyboard Toggle
Icon=input-keyboard-virtual
Type=Service
X-KDE-ServiceTypes=KPackage/GenericQML
X-KDE-PluginInfo-Author=Devin Lin
X-KDE-PluginInfo-Email=devin@kde.org
X-KDE-PluginInfo-Name=org.kde.plasma.keyboardtoggle
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=https://kde.org
X-KDE-PluginInfo-License=GPL
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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