Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Language and numeric sign #771

Open Jazain opened 4 years ago

Jazain commented 4 years ago

Hi, I have a keyboard configured with:

{
    "layout": "custom",
    "language": "it-IT",
    "customLayout": {
        "normal": [
            "7 8 9 {b}",
            "4 5 6 {clear}",
            "1 2 3 {sign}",
            "{dec} 0 {a}"
        ]
    }
}

Pressing the sign button when the content has decimals with EU separator "123,45" doesn't change the sign. The regex /^[+-]?\d*\.?\d*$/ prevents the action.

Mottie commented 4 years ago

Hi @Jazain!

Thanks for reporting this problem. I'll get it fixed in the next update.

In the mean time, you can redefine the sign function by modifying $.keyboard.keyaction.sign before initializing the keyboard.