Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davrob01 opened this issue Jan 11, 2019 · 0 comments

Comments

@davrob01
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant