Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title>KeyboardJS Bug 1</title>
- <script src="keyboard.0.2.2.js"></script>
- <script type="text/javascript">
- // this should be a different function from Alt GR
- KeyboardJS.bind.key('alt + e', function(event, keysPressedArray, keyComboString){
- console.log('event object', event);
- console.log('keys pressed', keysPressedArray);
- console.log('combo pressed', keyComboString);
- //block event bubble
- return false;
- }, function(event, keysPressedArray, keyComboString){
- //block event bubble
- return false;
- });
- function showActive(){
- var active = KeyboardJS.activeKeys();
- var activeText = document.createTextNode(active.join());
- document.body.appendChild(activeText);
- }
- </script>
- </head>
- <body>
- <h1>Keyboard JS Bug 1</h1>
- <!-- Markup goes here... -->
- <form>
- <input name="fld1" type="text"/>
- </form>
- <button onclick="showActive();">Show Active Events</button>
- <hr/>
- <p>
- Type AltGr + e with the focus in the input field -> it should display the euro symbol.
- </p>
- <hr/>
- </body>
- </html>
Add Comment
Please, Sign In to add comment