@ -19,12 +19,16 @@ Item {
id: root
property var overlays: [ ]
Plasmoid.onActivated: if ( ! Keyboards . KWinVirtualKeyboard . available ) {
root . action_settings ( )
} else if ( Keyboards . KWinVirtualKeyboard . visible ) {
Keyboards . KWinVirtualKeyboard . active = false
} else {
Keyboards . KWinVirtualKeyboard . enabled = ! Keyboards . KWinVirtualKeyboard . enabled
Plasmoid.onActivated: {
if ( ! Keyboards . KWinVirtualKeyboard . available ) {
root . action_settings ( )
} else if ( unsupportedState . when ) {
Keyboards . KWinVirtualKeyboard . forceActivate ( )
} else if ( Keyboards . KWinVirtualKeyboard . visible ) {
Keyboards . KWinVirtualKeyboard . active = false
} else {
Keyboards . KWinVirtualKeyboard . enabled = ! Keyboards . KWinVirtualKeyboard . enabled
}
}
Plasmoid.preferredRepresentation: Plasmoid . compactRepresentation
Plasmoid.fullRepresentation: Plasmoid . compactRepresentation
@ -67,7 +71,7 @@ Item {
states: [
State {
name: "available"
name: "un available"
when: ! Keyboards . KWinVirtualKeyboard . available
PropertyChanges {
target: Plasmoid . self
@ -88,6 +92,20 @@ Item {
}
PropertyChanges { target: root ; overlays: [ ] }
} ,
State {
id: unsupportedState
name: "unsupported"
when: Keyboards . KWinVirtualKeyboard . available && ! Keyboards . KWinVirtualKeyboard . activeClientSupportsTextInput
/ / W h e n t h e c u r r e n t c l i e n t d o e s n ' t s u p p o r t i n p u t m e t h o d s , w e c a n f o r c e
/ / t h e d i s p l a y o f t h e v i r t u a l k e y b o a r d s o i t e m u l a t e s a h a r d w a r e k e y b o a r d i n s t e a d
PropertyChanges {
target: Plasmoid . self
icon: "arrow-up"
toolTipSubText: i18n ( "Show Virtual Keyboard" )
status: Kirigami . Settings . tabletMode ? PlasmaCore.Types.ActiveStatus : PlasmaCore . Types . PassiveStatus
}
PropertyChanges { target: root ; overlays: [ ] }
} ,
State {
name: "visible"
when: Keyboards . KWinVirtualKeyboard . available && Keyboards . KWinVirtualKeyboard . visible