title: Change keyboard layout from code in osx
body: <p>I use below code for change keyboard layout from code but occur below warning from second line.</p>
  
  <pre><code>//warning
  Assigning to 'TISInputSourceRef' (aka 'struct __TISInputSource *') from 'const void *' discards qualifiers
  </code></pre>
  
  <hr>
  
  <pre><code>//code
  CFArrayRef sourceList = TISCreateInputSourceList (NULL, false);
  TISInputSourceRef wantedSource= CFArrayGetValueAtIndex(sourceList, 0);
  TISSelectInputSource(wantedSource);
  </code></pre>