Contents

keyboardSetUnicodeString(stringLength:unicodeString:)

Sets the Unicode string associated with a Quartz keyboard event.

Declaration

func keyboardSetUnicodeString(stringLength: Int, unicodeString: UnsafePointer<UniChar>?)

Parameters

  • stringLength:

    The length of the array you provide in the unicodeString parameter.

  • unicodeString:

    An array that contains the new Unicode string associated with the specified event.

Discussion

By default, the system translates the virtual key code in a keyboard event into a Unicode string based on the keyboard ID in the event source. This function allows you to manually override this string. Note that application frameworks may ignore the Unicode string in a keyboard event and do their own translation based on the virtual keycode and perceived event state.

See Also

Functions