Giter VIP home page Giter VIP logo

Comments (5)

britzl avatar britzl commented on May 29, 2024

Hmm, odd, it works perfectly fine on my HTC One M9 with Android 7.0. Using HTC Sense Input.

I assume you have a key-backspace Key Trigger in your input bindings (I guess you did, otherwise it shouldn't work at all)?

What settings do you have on Input repeat delay and interval? (although that should only affect how the input field behaves when keeping it pressed)

from gooey.

karlmacklin avatar karlmacklin commented on May 29, 2024

Is that a setting in Android you mean? If in Defold, whatever the example project is using.

I'm using Swiftkeyboard in Android, and switching to Samsung keyboard stops the issue. My initial description is a bit off I realize after my new testing.

The way Swiftkeyboard seems to act is like this:

Type 1 letter
Hit backspace once, nothing happens
Hit once again, it removes the letter

Type 3 letters,
Hit backspace three times, nothing happens
Fourth time, it removes one of the letters, and consecutive backspace hits continue to remove letters.

So, it's as if it builds up a buffer of needed backspace its that is equivalent to the amount of characters input. That is why I first thought it requires me to hold down backspace to delete at all, which is not the case.

Some type of ghost field or something? I haven't done enough input testing on different games on the phone to see if this is a common thing with Swiftkeyboard, but I'd attribute it to that at least and not any issue with Gooey/Defold.

Unless you have a followup idea of something else to test, feel free to close!

from gooey.

britzl avatar britzl commented on May 29, 2024

This sounds like there's some issue with how input.marked_text is handled. I'll install SwiftKeyboard and take a look.

from gooey.

britzl avatar britzl commented on May 29, 2024

Ok, I found the reason. Make sure to go into game.project and select HiddenInputField as the Input Method in the Android section. The KeyEvent option which is default is the old way of handling input on Android.

from gooey.

karlmacklin avatar karlmacklin commented on May 29, 2024

I tried this, and initially I thought it worked fine.

However, in my example, I have a gooey text input that I fill with text (and successfully can backspace within now).

With KeyEvent way, the default one, let me do the following:
With the keyboard up and typing into the field, I could press a gui button I have that is coded like this:

in init function:
input = kenneyblue.input("input", gui.KEYBOARD_TYPE_DEFAULT, nil, { x=0, y=0 }, { empty_text = "EMPTY, MAX 8 CHARS" })

on_input:

spaceshooter.spacebutton("createbtn", action_id, action, function(button)
  local success = profilehandler.create_profile(input.text)
  refresh_gui()
end)

The input.text there gets the input data from the text field correctly.

With the new HiddenInputField, the input.text is empty, until I press enter on the swiftkey keyboard.

Perhaps this is expected, but I'm not sure how to tell the keyboard to commit the text so to say, from Defold, if even possible?

from gooey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.