Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide/show vkb depending on ContextKit keyboard opened state #40

Open
kimmoli opened this issue Nov 8, 2014 · 12 comments
Open

Hide/show vkb depending on ContextKit keyboard opened state #40

kimmoli opened this issue Nov 8, 2014 · 12 comments

Comments

@kimmoli
Copy link

kimmoli commented Nov 8, 2014

preparations for tohkbd2.

tohkbd daemon will emit a dbus signal on systembus when it is connected or disconnect.
For optimum user experience with fingerterm, the "ui/vkbShowMethod" should be set to "off" when tohkbd is connected, and to previous value when disconnected.

path=/; interface=com.kimmoli.tohkbd2; member=keyboardConnectedChanged
boolean false when disconnected
and
boolean true when connected

@monich
Copy link
Member

monich commented Nov 8, 2014

Why would fingerterm need to distinguish between tohkbd and any other kind of physical keyboard such as, say, bluetooth?

@kimmoli
Copy link
Author

kimmoli commented Nov 8, 2014

There is no need to separate tohkbd and other keyboards, if there is other way to detect attachment/removeal of such and turning virtual keyboard off/on accordingly.

@monich
Copy link
Member

monich commented Nov 9, 2014

Sounds like support for physical keyboards is generally broken in Sailfish. Last time I checked (about a year ago) it definitely was. Perhaps it's time to take a look at it.

@kimmoli
Copy link
Author

kimmoli commented Nov 9, 2014

yes, there were some fixes on it during spring. uinput in general works, but seems it is not supporting compose etc.
Tried also xkbcommon (seems it is rather old version too)

@deztructor
Copy link

So, input devices tracking should be fixed if it is broken instead of inventing new ways to notify and modify everything to support it. There is "maemo.InternalKeyboard.Open" context property provided by generic keyboard statefs provider. It should work in generic case if input device providing [KEY_Q, KEY_P] is present (cor::udev library has routine to check it).

@kimmoli
Copy link
Author

kimmoli commented Nov 9, 2014

agree

@kimmoli kimmoli changed the title Request for listening dbus-signal to hide/show vkb Request to hide/show vkb depending is physical keyboard connected or not Nov 9, 2014
@spiiroin
Copy link

spiiroin commented Nov 9, 2014

For retractable keyboards we probably would want to have some event when keyboard is opened/closed. That could then be used (in mce) as input for display blank/unblank policy and forwarded to ui for hide/show virtual keyboard. If tohkbd is already using evdev, SW_KEYPAD_SLIDE is already kind of used for this at mce side.

@deztructor
Copy link

@spiiroin In the maemo.InternalKeyboard there are Open and Present properties

@thp
Copy link
Contributor

thp commented Jan 7, 2015

Agree that the way to do it would be to listen to a contextkit/statefs property, here's the keyboard provider source:

https://github.com/nemomobile/statefs-providers/blob/master/src/keyboard_generic/provider_keyboard_generic.cpp

Added an issue there: nemomobile/statefs-providers#28

@thp thp changed the title Request to hide/show vkb depending is physical keyboard connected or not Hide/show vkb depending on ContextKit keyboard opened state Jan 7, 2015
@deztructor
Copy link

iirc @spiiroin is going to provide some signal to reflect "Opened" state to be used e.g. by statefs, isn't it?

@spiiroin
Copy link

spiiroin commented Jan 8, 2015

@deztructor: yes, nemomobile/mce#230 (in review) adds the following signals

/usr/lib/qt5/bin/qdbus --system com.nokia.mce /com/nokia/mce/signal|grep keyb
signal void com.nokia.mce.signal.keyboard_available_state_ind(QString keyboard_state)
signal void com.nokia.mce.signal.keyboard_slide_state_ind(QString slide_state)

The vkb related statefs could be derived from the "available" data.

@kimmoli
Copy link
Author

kimmoli commented Jun 28, 2015

nemomobile/statefs-providers#41 is required for correct operation, at least using 0.2.74 with this nemomobile-packages/maliit-framework#8 seems to work(ish)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants