CarlRaymond/jquery.cardswipe

Way to easily change leading character to something other than semicolon or %

Opened this issue · 0 comments

Hello,

I have reason to allow a semicolon to be typed normally, as well as a percent sign.

To allow for simple typing of those 2 characters (I dont want the user to have to press twice), I have to do 2 things:

  1. I need to configure my scanner to prefix the data with another character. This I can do. I am going to use the '`' character since the user will not have to type that character.

  2. I then need to configure the jquery.cardswipe listener to ignore semicolons and '%', and instead listen for the '`' character.

I am assuming the only option I have is to revise some of the jquery.cardswipe.js code manually.
Is this correct?

I originally thought that setting a prefixCharacter achieved this, but I realized that is for a prefix before a semicolon or % sign and a semicolon and percent sign is still listened for (which I dont want).

I suppose I will have to change the Keypress listener part of the code and replace the e.which == 59 to whatever number is for this character '`'.

Am I on the right path?

Note: in my case I am only concerned with track 2.

Thank you