1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

iOS keyboard_string & iOS

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Clinton Wheeler, Feb 12, 2020 at 5:36 AM.

  1. Clinton Wheeler

    Clinton Wheeler Member

    Mar 11, 2018

    Im developing an app for iOS that uses the keyboard_string to input text into text fields, this works beautifully in Windows/Mac OS but if i port it to iOS (iPAD) for some reason you cannot reset the keyboard_string to "".

    Currently my code will take a string entered from the keyboard_string then process it through another variable and reset the keyboard string:

    if keyboard_string <> ""
         var __add = keyboard_string;
         keyboard_string = "";
         add_to_text = true;
    In iOS the keyboard_string does not reset to "" and this leads to the keyboard_string being added each time from what it previously was and exponentially adds to the text box with every key stroke.

    Has anyone had this problem before?

  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Apr 13, 2016
    I've not seen this before, but it sounds like a bug and as such I'd report it to YYG. You can do this from the "Help" menu in GMS. Please also supply a download link to a YYZ of the project that shows the issue.
  3. rIKmAN

    rIKmAN Member

    Sep 6, 2016
    Sounds like the opposite to this bug from way back: https://forum.yoyogames.com/index.php?threads/keyboard_string-refreshes-every-step.51373/

    Just tested this and can confirm keyboard_string doesn't reset on iOS, and keyboard_lastchar and keyboard_lastkey also don't appear to work as intended as _lastchar repeats infintely even when cleared and put inside a _lastkey logic check (as per the code example in the manual).

    On Android keyboard_string seems to work correctly, but keyboard_lastkey and keyboard_lastchar show the same behaviour as on iOS.

    OP could you post the link to the bug report in this thread when you get a response please?

    Seems like the _lastchar bug is already logged, appears it's read-only when using the virtual keyboard on mobile.
    Last edited: Feb 12, 2020 at 12:04 PM
  4. Clinton Wheeler

    Clinton Wheeler Member

    Mar 11, 2018

    I have reported this as a bug, will edit main entry when i get an answer

    rIKmAN likes this.

Share This Page