Search code examples
jquerymacossafarispecial-charactersvirtual-keyboard

using jquery virtual keyboard on mac, special characters prints as ˜n instead of ñ in safari


so im using jquery virtual keyboard http://mottie.github.io/Keyboard/

now checkout the jsfiddle http://jsfiddle.net/Mottie/MK947/

check it out using Safari on Mac

so normally in mac you can type in special characters using for instance option + n then n to print out ñ .... however if you click on the input field in that fiddle and then try to type in this special character at first you can do this to print the first ñ but then on second, third attempt afterwards pressing option + n would have its effect disappear immediately and if you then press n it ends up printing ˜n instead of ñ

any idea on how to fix this?


Solution

  • Answer copied from this GitHub issue:

    You can solve this problem by disabling the useCombo option:

    $('#keyboard').keyboard({
      // combos (emulate dead keys : http://en.wikipedia.org/wiki/Keyboard_layout#US-International)
      // if user inputs `a the script converts it to à, ^o becomes ô, etc.
      useCombos : false
    });