Search Unity

TextMesh Pro TextMeshPro Hardcoded InputField Keybindings

Discussion in 'UGUI & TextMesh Pro' started by bentontr, Aug 25, 2019.

  1. bentontr

    bentontr

    Joined:
    Jun 9, 2017
    Posts:
    39
    I noticed in TMP_InputField::KeyPressed there are a variety of hardcoded key inputs. Is it possible to customize / override them in some way? For example, as it is if I have a keybinding to cycle through previously sent messages in a chat input (such as ALT + uparrow) there is no way to intercept these events in the textmeshpro input. So in the case I gave above, it would move the cursor to the beginning of the input when I cycle upwards. It would be nice if at least TMP_InputField::KeyPressed was virtual so we could provide our own event for the textmeshpro functionality (that way certain keys could be disabled depending on the user's implementation).

    Any ideas?
    Thanks!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Great question! Any answers?