Skip to content

Turkish keyboard problem #14

@tolgaonbay

Description

@tolgaonbay

Hi,

We have a problem with the plugin in Turkish keyboards. Some of the special characters (e.g. #, $, @, ...) can be used even if they are filtered out in the component with a valid regex. Those characters that I mentioned are generated with an AltGr key in a Turkish layout keyboard. Some of the mappings include:

AltGr + 3 => #
AltGr + 4 => $
AltGr + Q => @
AltGr + ] => ~

For example with below definition, users can enter #, $, @ characters with the mentioned keystrokes.

<pe:keyFilter for="vkn" regEx="/[0-9]/i" preventPaste="false" />

You can look at the Turkish keyboard layout from http://ascii-table.com/keyboard.php/179

At the below line, e.ctrlKey and e.altKey are both true for the specified key strokes. I don't think it is the right fix, but if I remove the if condition from the script, it works like a charm.

https://github.com/akzhan/jquery-keyfilter/blob/master/jquery.keyfilter.js#L134

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions