Guest User

Untitled

a guest
Sep 23rd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>KeyboardJS Bug 1</title>
  5. <script src="keyboard.0.2.2.js"></script>
  6. <script type="text/javascript">
  7.  
  8. // this should be a different function from Alt GR
  9. KeyboardJS.bind.key('alt + e', function(event, keysPressedArray, keyComboString){
  10. console.log('event object', event);
  11. console.log('keys pressed', keysPressedArray);
  12. console.log('combo pressed', keyComboString);
  13.  
  14. //block event bubble
  15. return false;
  16. }, function(event, keysPressedArray, keyComboString){
  17.  
  18. //block event bubble
  19. return false;
  20. });
  21. function showActive(){
  22. var active = KeyboardJS.activeKeys();
  23. var activeText = document.createTextNode(active.join());
  24. document.body.appendChild(activeText);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <h1>Keyboard JS Bug 1</h1>
  30. <!-- Markup goes here... -->
  31. <form>
  32. <input name="fld1" type="text"/>
  33. </form>
  34. <button onclick="showActive();">Show Active Events</button>
  35. <hr/>
  36. <p>
  37. Type AltGr + e with the focus in the input field -> it should display the euro symbol.
  38. </p>
  39. <hr/>
  40. </body>
  41. </html>
Add Comment
Please, Sign In to add comment