I need to create a features: when a user held pressed a key, a function A is called. When a user release the button function B is called.
I need to make sure that first function runs only when the button is HELD. At the moment using chrome, when I keep pressed a button the function A is called repeatedly, and function B is running when release.
How is possible in java-script or jquery?