Sign in to follow this  
spinnerbox

Disable keyboard shrotucts on browsers

Recommended Posts

This question is of course for each specific browser forum, but I decided to ask anyway.

I am using Phaser to develop educational game where you type letters which are analog to Sandhi/Devanagari/Sanscrit language letters. So you type ṁ or ī or ṇ, ñ, etc... and these letters are simplified by typing .m, -i, n. , ~n i.e I enter letters available on my keyboard but a special Sanscrit software analyzes these keystrokes and replaces them with appropriate    Devanagari letters.

Of course this software is not a necessity so I need to type keys from keyboard to achieve the letters above, i.e encode them.

So far I have used addKeyCapture() function to disable Space, ".", "-", and "'". Well I planned to disable Shift as well but I works somehow. Also single quote doesn't took effect as I can still open "Quick Find" box in Firefox.

gameObject.input.keyboard.addKeyCapture([32, 39, 45, 46]);

So, is there a way to disable browser keyboard shortcuts trough JavaScript without installing or configuring additional plugins, addons or browser settings?

Any ideas are welcome.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.