Comments (5)
I'm not a fan of blocking all keyboard shortcuts but maybe this is the right time to do it. I'll put it in and see if it causes any issues.
from diabloweb.
Okay, preventing default on all keypresses was a disaster. Limiting it to Backspace and F1/F5 for now.
What is the purpose for mapping F5-F8 to numpad?
from diabloweb.
oh, didn't realize you prevent default on all keypresses. I wrote a tampermonkey script to prevent it only for f1, f5, and backspace and haven't have any issue.
F5-F8 were used as hotkey to switch skills. As you would suspect, only f6 and f8 work flawlessly, f5 will refresh the page and f7 will call out a firefox window.
from diabloweb.
I tried using KeyboardEvent
to remap F5-F8 w/o any success. I suspect it's not allowed for security reasons (see quote from MDN below). Besides, even if it works, it would still trigger as Browser's shortcut. Is there a way to change the key binding inside complied devilution
wasm files? Numpad 1 - 4 will work well for this.
Manually firing an event does not generate the default action associated with that event. For example, manually firing a key event does not cause that letter to appear in a focused text input. In the case of UI events, this is important for security reasons, as it prevents scripts from simulating user actions that interact with the browser itself.
from diabloweb.
Ah, right. Thought you meant mapping the other way. Extended it to F1-F8 plus backspace.
from diabloweb.
Related Issues (20)
- problem HOT 1
- NPC Quest Dialog Stuck on The Butcher
- Demo is not working. HOT 5
- I've tried three different MPQ and don't work
- Not an issue per-se but I'd like to confirm that the trick to copy items works perfectly :D
- Inclusion into ScummVM? HOT 1
- l
- . HOT 1
- Can't run on offline HOT 2
- Spell Quick Selection not working using Touch interface.
- Diablo Online Game - Site No Longer Enabled? HOT 1
- Lost my save when switched to .mpq HOT 4
- 13767297 HOT 1
- issue HOT 1
- It aint workin :( HOT 1
- Diablo Error: Kali Linux late 09 Imac HOT 1
- diabat
- Diablo hellfire HOT 1
- b;aibh i"D HOT 1
- Problem? 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 diabloweb.