Android Question Webview _ Keycode Problem

FrankDev

Active Member
Licensed User
Hello

I have the following problem with the Webview

how do I intercept certain keycodes that the webview does not react to them - but the keycodes are delivered to me by other means.

It is about keycodes 19,20,21,23, 89,90

Best regards
Frank
 

FrankDev

Active Member
Licensed User
@eps

I use the webview on the Amazon Fire Tv.

I need a 'mouse' to navigate with the remote control - I control it with the keycodes 19,20,21,22,24
but I don't get this if I set the webview to focused = True. If I set it to Focused = False everything goes so far.
Only I can't enter anything into the text fields because they are locked.

like I said... I want to simulate a mouse with the Fire TV remote control
 
Upvote 0

eps

Expert
Licensed User
So you don't have access to the web page itself - you are merely presenting it and then want to fire input from the web view back to your App?

Just trying to work out the architecture here.
 
Upvote 0

FrankDev

Active Member
Licensed User
Hello,

sorry for the late reply. Today again stress. Corona makes things more difficult in every situation.
Yes, exactly... if I set the webview to enabled, it catches all key events.

Actually I thought it should be possible to intercept some keycodes in the webview so that it doesn't react to them.

The problem with keycode 19,20,21,22 is that the curor jumps back and forth on the webview.

if I receive these keycodes now on with the activity. But the webview has already reacted by moving the cursor.

in case of doubt the page scrolls up.
Therefore you have to intercept the keyevents before they arrive at the webview or, respectively, make the webview (best solution) not react to the keycodes.

BEST greetings
Frank
 
Upvote 0

eps

Expert
Licensed User
Are you using a device with a physical keyboard?

A couple of pictures might help.

Isn't there an Amazon Fire SDK or something? Have you looked at that?
 
Upvote 0

FrankDev

Active Member
Licensed User
no... I do not use a physical keyboard.

the Fire TV remote control acts as a keyboard that sends keycodes 19,20,21,22.

This is not a Fire Tv problem.

I use the 'normal' webview control,
apart from that.

the app should also run on 'normal' android boxes + google Tv
 
Upvote 0
Top