Comments (4)
There is an optional cheerpjInit
callback that let the user decides which additional shortcuts should be handled by Java rather than the browser: https://labs.leaningtech.com/cheerpj3/reference/cheerpjInit#overrideshortcuts
We do not automatically preventDefault
all shortcuts since that would hijack legitimate ones that the user of the page might need. With the aforementioned callback the page author can refine the behavior.
from cheerpj-meta.
after using
await cheerpjInit({
overrideShortcuts: function (e) {return true;}
});
I cannot input a single character, something wrong?
I suppose to have as many keys as possible because it's a text editor app.
from cheerpj-meta.
Simply returning true
won't work. By returning true
you are causing CheerpJ to preventDefault()
all events. By calling preventDefault()
on all keydown
/keyup
events there will be no keypress
events.
This is how the browser work, not something that CheerpJ can change.
You need to carefully select the combination you are interested in.
from cheerpj-meta.
still impressive job, thank you!
from cheerpj-meta.
Related Issues (20)
- java.awt.Button, java.awt.Choice, etc. do not work on mobile browsers HOT 2
- Missing libarc.so HOT 3
- error: package org.bouncycastle.jcajce.provider.asymmetric.ec does not exist import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey; HOT 1
- nullpointerexception HOT 2
- Resetting the Classloader / static fields after program execution. HOT 1
- CheerpJ works with Node's http-server but not with Python's http.server HOT 2
- NPE when creating CheerpJInputStream HOT 4
- Issue with running the example HOT 3
- Missing import:"_ZNK3icu9MarkArray12getMarkClassERKNS_16LETableReferenceEjiPKNS_14LEFontInstanceER7LEPointR11LEErrorCode" HOT 5
- java.io.FileNotFoundException ocurred when create fileInputStream HOT 2
- java.io.FileNotFoundException ocurred when create fileInputStream HOT 1
- Application freezes HOT 7
- applet does not start HOT 1
- CheerpJ3 not working on iPad Safari
- back/forwards mouse buttons cause applet to crash HOT 1
- Class compiled with Java 8 not runnable HOT 3
- requestAnimationFrame not supported in this Worker. HOT 3
- java.lang.UnsatisfiedLinkError on java.util.zip.Adler32.updateBytes HOT 3
- Can't load classes with non-ascii names HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cheerpj-meta.