2

Detect Bluetooth Keyboard's "Enter" key press using UIKeyCommand

I am using UIKeyCommand without modifiers to detect key presses of certain characters. For instance, when a user with an iPad + Bluetooth Keyboard presses the backspace key, an action occurs.

Here's the code for that:

UIKeyCommand(input: "\u{8}", modifierFlags: [], action: "Backspace:")

I am trying to make something happen when the user presses the enter key. I do not know the code for the enter key.

Backspace is "\u{8}", but what is return?

Answer (thanks Craig): enter is "\r", see question that this is a duplicate of.

owlswipe
  • 19,159
  • 9
  • 37
  • 82

0 Answers0