Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

TISGetInputSourceProperty documentation

Hi,

I am trying to find the current keyboard layout for which I used this code

TISGetInputSourceProperty(TISCopyCurrentKeyboardInputSource(), kTISPropertyInputSourceID);

but I could not find any documentation for TISGetInputSourceProperty() or TISCopyCurrentKeyboardInputSource() causing me to doubt if those are public APIs.

We are thinking If this API is not public and we still use it in our Java SDK, it may affect applications (that use Java SDK) which are distributed via AppStore and could affect notarization.


Could someone please point me to the documentation of these APIs and also ascertain if these 2 APIs are public and could be used in our code without any problem?


Regards

Prasanta

MacBook Pro Retina

Posted on Oct 11, 2019 8:38 PM

Reply
5 replies

Oct 11, 2019 9:04 PM in response to prasantasd

Hello Prasanta,


TISInputSourceRef source = TISCopyCurrentKeyboardInputSource(); CFDataRef layout_data = static_cast<CFDataRef>((TISGetInputSourceProperty(source, kTISPropertyUnicodeKeyLayoutData))); if (!layout_data) { // TISGetInputSourceProperty returns null with Japanese keyboard layout. // Using TISCopyCurrentKeyboardLayoutInputSource to fix NULL return. source = TISCopyCurrentKeyboardLayoutInputSource(); layout_data = static_cast<CFDataRef>((TISGetInputSourceProperty(source, kTISPropertyUnicodeKeyLayoutData))); if (!layout_data) { // https://developer.apple.com/library/mac/documentation/TextFonts/Reference/TextInputSourcesReference/#//apple_ref/c/func/TISGetInputSourceProperty return result;


https://github.com/microsoft/node-native-keymap/blob/master/src/keyboard_mac.mm



Oct 12, 2019 9:07 PM in response to BDAqua

This is strange..If TISGetInputSourceProperty is public API, then there should be some documentation. It seems from https://developer.apple.com/library/mac/documentation/TextFonts/Reference/TextInputSourcesReference/#//apple_ref/c/func/TISGetInputSourceProperty

that documentation existed some time back but removed now. Is it intentional? does apple not want user to use this API?

I was hoping somebody from apple shed some light as it is a apple forum.

TISGetInputSourceProperty documentation

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.