# Umlauts input on OS X

**URL:** <https://discourse.glfw.org/t/umlauts-input-on-os-x/629>\
**Category:** support\
**Created:** [March 24, 2016, 7:19am UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629 "2016-03-24T07:19:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.glfw.org/u/Florian)\
**Post date:** [March 24, 2016, 7:19am UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629/1 "2016-03-24T07:19:19Z")

</div>

Hello everyone,  
on Mac OS X, users can type Umlauts (e.g. _ä_), using _option/alt_ + _u_ to create the diaeresis ( ¨ ) and then the character they want the umlaut of, e.g. _a_. The text on [moving from GLFW 2 to 3](http://www.glfw.org/docs/latest/moving.html) said:

> However, many keyboard layouts require more than one key to produce characters with diacritical marks. Even the Swedish keyboard layout requires this for uncommon cases like ü.

And the [input guide](http://www.glfw.org/docs/latest/input.html#input_char) says:

> Unlike key input, text input obeys keyboard layouts and modifier keys and supports composing characters using dead keys.

So I expected this to work using `glfwSetCharCallback`, but _option_+_u_ yields nothing and the following character is reported unaltered: instead of _ä_ I get _a_.  
Is this the intended behavior? Shouldn’t _option_+_u_ return U+0308 (_COMBINING DIAERESIS_) to the character callback on OS X (when using the U.S. keyboard layout)? Is there any portable way to get text input using GLFW like I’d get it in a native text field?  
Thanks!

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 24, 2016, 10:12am UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629/2 "2016-03-24T10:12:04Z")

</div>

This sounds like a possible bug or missing feature. It may be a missing feature because the glfw documentation is referring to standard unicode input where the user presses a number of keys together at once to produce a unicode character. This method you mention has the user pressing two keys at once, releasing, then pressing another key.

I don’t personally know if this input method is supported under OS X. The standard unicode multi-key approach is though.

The CharCallback should only receive unicode characters, so if this input method was to be supported Option+U followed by a should result in ä which is U+00E4. The Option+U should be ignored, but the next key press should be translated.

I’d recommend trying the latest code on Githhub, and if this issue persists [filling an issue](https://github.com/glfw/glfw/issues).

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 24, 2016, 12:05pm UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629/3 "2016-03-24T12:05:56Z")

</div>

I’ve just tested this with latest and it works fine - the test app events on OS X 10.10 calls the char callback with 0x000000e4 which is ä after pressing Option+u then a.

So it looks like you need to use a newer version of glfw.

---

<div class="post-metadata">

**Author:** ![Florian](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Florian](https://discourse.glfw.org/u/Florian)\
**Post date:** [March 24, 2016, 1:45pm UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629/4 "2016-03-24T13:45:32Z")

</div>

True, it works. The system-wide installed version reports to be 3.1.2, so I figured it’s current enough. I guess it might’ve been compiled with some odd parameters. Anyway, sorry for not trying the latest version from git first and thank you for the help!

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [March 24, 2016, 2:12pm UTC](https://discourse.glfw.org/t/umlauts-input-on-os-x/629/5 "2016-03-24T14:12:50Z")

</div>

Seems 3.1.2 was released 2015-10-12 and [what looks like the fix was 2015-11-13](https://github.com/glfw/glfw/commit/3107c9548d7911d9424ab589fd2ab8ca8043a84a), and I found the [corresponding issue #456](https://github.com/glfw/glfw/issues/456)
