nemomobile / fingerterm

12 stars 29 forks source link

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

Open kimmoli opened 10 years ago

kimmoli commented 10 years ago

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 commented 10 years ago

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

kimmoli commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

agree

spiiroin commented 10 years ago

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 commented 10 years ago

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

thp commented 9 years ago

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: https://github.com/nemomobile/statefs-providers/issues/28

deztructor commented 9 years ago

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

spiiroin commented 9 years ago

@deztructor: yes, https://github.com/nemomobile/mce/pull/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 commented 9 years ago

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)