On TouchScreen Laptops Numpad number Input does not work in the App

Hello dear developers

We have an app where one uses NUMPAD on laptop / pcs / macs for input of numbers.

The letter input for the login and registration works but we observe that on all touch screen laptops

the NUMPAD number input or keyboard number input in the app is not working while it works on non-touchscreen computers.

In other words: We cannot insert numbers in the app on touch-screen laptops with the keyboard at all

Is the touch-screen somehow taking place of the numpad handler?

How can we activate the keyboard number input for touch-screen laptops?

Kind regards,

Matt

  1. Are you talking about native.* text field inputs or Runtime key events?

  2. Have you written a generic key (event) listener to see if you’re getting any key events at all from the numpad?

    local function key( event ) for k,v in pairs( event ) print(k,v) end print("------------------\n") end Runtime:addEventListener( “key”, key )

Hello Ed

First of all thanks for your reply.

I have tested this script from the Corona documentation and it works on the NON-TOUCH-Laptops but it does not work nor bring any print feedback on the touch-enabled Laptops.

It seems like the touch-functionality eats away the traditional keyboard functionality. I have two touch-enabled laptops and on none of them this script works.

It would be a miracle for me if anyone could solve how to get this script working on touch-enabled laptops.

local function onKeyEvent( event )    -- Print which key was pressed down/up     local message = "Key '" .. event.keyName .. "' was pressed " .. event.phase     print( message )     -- If the "back" key was pressed on Android or Windows Phone, prevent it from backing out of the app     if ( event.keyName == "back" ) then         local platformName = system.getInfo( "platformName" )         if ( platformName == "Android" ) or ( platformName == "WinPhone" ) then             return true         end     end     -- IMPORTANT! Return false to indicate that this app is NOT overriding the received key     -- This lets the operating system execute its default handling of the key     return false end -- Add the key event listener Runtime:addEventListener( "key", onKeyEvent )

Sounds like you need to file a bug.  You should supply the exact models of all devices you’ve tried in the bug listing (would be nice here too).

You’ll need to provide a test case (config.lua, main.lua, and build.settings) too.

https://developer.coronalabs.com/content/bug-submission

  1. Are you talking about native.* text field inputs or Runtime key events?

  2. Have you written a generic key (event) listener to see if you’re getting any key events at all from the numpad?

    local function key( event ) for k,v in pairs( event ) print(k,v) end print("------------------\n") end Runtime:addEventListener( “key”, key )

Hello Ed

First of all thanks for your reply.

I have tested this script from the Corona documentation and it works on the NON-TOUCH-Laptops but it does not work nor bring any print feedback on the touch-enabled Laptops.

It seems like the touch-functionality eats away the traditional keyboard functionality. I have two touch-enabled laptops and on none of them this script works.

It would be a miracle for me if anyone could solve how to get this script working on touch-enabled laptops.

local function onKeyEvent( event )    -- Print which key was pressed down/up     local message = "Key '" .. event.keyName .. "' was pressed " .. event.phase     print( message )     -- If the "back" key was pressed on Android or Windows Phone, prevent it from backing out of the app     if ( event.keyName == "back" ) then         local platformName = system.getInfo( "platformName" )         if ( platformName == "Android" ) or ( platformName == "WinPhone" ) then             return true         end     end     -- IMPORTANT! Return false to indicate that this app is NOT overriding the received key     -- This lets the operating system execute its default handling of the key     return false end -- Add the key event listener Runtime:addEventListener( "key", onKeyEvent )

Sounds like you need to file a bug.  You should supply the exact models of all devices you’ve tried in the bug listing (would be nice here too).

You’ll need to provide a test case (config.lua, main.lua, and build.settings) too.

https://developer.coronalabs.com/content/bug-submission