Comments (3)
I believe this is because Macs transform combinations of keys and Option to not-those-characters (I can't exactly tell what this feature is called, but it's the same thing as being described in this StackOverflow post) -- e.g. if I press down on (in this textarea, on Github) Option + S on my Mac, I get ß.
So when the downforacross.com
frontend is reading the key
property of that key press event, it's detecting the key as ß. These lines are the ones that have to be changed (in the hackiest way possible in that SO post I linked) are here.
from downforacross.com.
AFAICT, there's no way for Macs to not do that (i.e. it's not like we can disable that on the browser level, and handle it the same way that we're doing now). Note that there's also a different set of transformations that happen for Option+Shift+key's
.
I would recommend that we just add those transformations (i.e. for S, W and P respectively -- ß, ∑, π when pressing Option
, and Í, „, and ∏ when pressing Option+Shift
-- this is the case in most of the English keyboards available (i.e. everything but Irish and Indian)) in the lines in those permalinks. Seeing as those are not valid characters in crosswords anyways, there should be no conflict with other parts of the codebase.
The other alternative would be to simply change the shortcuts. However, some people would be used to the existing behaviour, and would need to learn the changed ones. So this previous option is non-invasive to existing users.
I've added / tested those changes in this branch, if the former behaviour is desirable.
from downforacross.com.
Yup. In case it helps, since I'm assuming you're not on Macs -- I used this link to generate a series of keyboard events for Opt+S on my Mac in Chrome:
And for Opt+Shift+S:
I think your approach will work fine.
The alternative approach would be to use the "code" instead of the "key", will still returns the unmodified "S" in this case, possibly around line 279:
I'm not sure if that would break other things that depend on existing behavior though.
from downforacross.com.
Related Issues (20)
- Sweep: automatically detect weird encoding and render it correctly when displaying clues (testing) HOT 6
- At the end of a game show words/letters solved per player
- Nav icons are too small to click on small screens
- Save and load previously toggled vim mode settings
- Add jumping to specific clues in Vim Mode
- Request: Docker Container HOT 4
- Underlined clues don't render correctly HOT 2
- Feature request: Help used statistics
- Feature request: Clickable clues in chat
- Support for larger circles
- Remove firebase
- Button to Reveal if Rebus
- Add Shortcut to Copy on Grid
- Cross-site scripting in username edit field HOT 4
- Downforacross website down
- Backspace doesn't consistently go to previous cell on Android HOT 1
- Unable to load puzzle on local dev server HOT 2
- emoji urls dead HOT 1
- Feature Suggestion : Move Undos
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 downforacross.com.