I actually asked it over the IRC channel. They replied that it was more like a feature request. I’ll post the whole conversation
<astregon> Is there a way to get key pressed event for TextInput in Android devices ?
<astregon> i tried using Keys.onPressed
<astregon> it just captures del and enter keys
<astregon> not other keys i.e digits/alphabets
<lqi_> i guess others are from the virtual keyboard(input method) event instead of keyboard event
<astregon> lqi, i didn’t understand
<lqi> sry, /s/others/they
<astregon> i’m using the virtual keyboard
<astregon> so it Keys event handler doesn’t capture it ?
<astregon> lqi, is it a bug ?
<lqi> Keys are only for real keyboard
<lqi> i don’t think it’s a bug
<lqi> it’s more like a feature request if you want to have
<astregon> ok, so is there a workaround for it for now ?
<lqi> not sure yet
<lqi> perhaps you could ask some qt&android experts
<astregon> ok.. thanks
<jpnurmi> astregon: mobile platforms with virtual keyboards & predictive input etc. are a whole different world than good old physical keyboards. there are no key events as such, but the input method is in a “composing” state until it commits the composed content. furthermore, the actual textual content of TextInput doesn’t change meanwhile the input method is composing. it just visually shows the currently composed text
<jpnurmi> i’m not an input method expert, but this is my interpretation of the issue :)
<astregon> jpnurmi, but then how is it able to capture del and enter ?
<jpnurmi> astregon: using the input method events as lqi described
<jpnurmi> i’m not sure what would be the best solution to expose this information to qml, but we certainly need to do it in a way or another
<jpnurmi> afaik they tried faking key events on ios or android, but it turned out to be a dead end
<astregon> jpnurmi, Alright, thanks. Hoping it would be implemented as early as possible. I see lot of those questions on forums.
↧