Mac textinput

Added the MonoMac version of #1489