Open rom1504 opened 3 years ago
related #87
As a first line of defense we should probably add a beforeunload
event handler checking if Ctrl is pressed and saving users from accidentally closing the tab
yes I agree, good idea let's do it
An other solution is to change how sprint work. In vanilla you can also double tap w to toggle sprint, so we could implement that and disable ctrl.
and disable ctrl
that's the problem, we can't
maybe displaying a warning in the loading screen "don't press ctrl+w to sprint" could do the trick I guess...
and disable ctrl
that's the problem, we can't
I meant disabling sprinting with ctrl (not using it)
yeah I understand but users try and exit the window
yeah I understand but users try and exit the window
If ctrl does nothing they will try once and not again when they see it doesn't work. The problem is because the feature is there, people will try to use it.
We could just put a warning while loading and then use the beforeunload stuff
I need to read all of the comments before I do because you guys said that
and disable ctrl
that's the problem, we can't
but you can display the (browser standard) confirmation dialog. So the User wont instantly quit and also close 10 other Tabs :) You could set Sprint to another Key and also detecting Double W.
btw. Thanks for this great work here, I really like it!
and disable ctrl
that's the problem, we can't
but you can display the (browser standard) confirmation dialog. So the User wont instantly quit and also close 10 other Tabs :)
You could set Sprint to another Key and also detecting Double W.
btw. Thanks for this great work here, I really like it!
We tried doing that and it looked ugly.
yeah preventing closing the page feel like "ad popup" people should be able to just close it
yeah preventing closing the page feel like "ad popup" people should be able to just close it
Last time it didn't track the state of Ctrl and W keys
if/when you add keybindings to the site, this wouldn’t be a problem. ctrl just wouldn’t be a valid sprint key
The issue isn’t really not having a way to sprint. We could change the keybind to something else today if we wanted to. However, it’s much more difficult to correct muscle memory—most, if not all of the people on the dev team have been playing MC JE for years, and have pressing control-w to sprint as a habit.
On Fri, Jun 25, 2021 at 03:13, radiish @.***> wrote:
if/when you add keybindings to the site, this wouldn’t be a problem. ctrl just wouldn’t be a valid sprint key
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-web-client/issues/117#issuecomment-868279318, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVK4MVH56OCJPHHUQUM5LDTUQUCRANCNFSM4ZNFOAMA .
Maybe pressing ctrl could enable sprint until the W key is depressed. This would be similar to vanilla behavior (i.e. you can walk and then tap ctrl to start sprinting) but also enable you to sprint somewhat normally (tap ctrl and then hold w).
im gonna try to do this
*fix
K I think I got it.
Adding alt as a key for sprinting could work (looks like #239 is trying to do this now). Keeping control around can be considered for non-QWERTY keyboards and also Electron where Control-W can be disabled.
You can actually disable CTRL+W in your browser (if you use Chrome). You can install this extension (https://chrome.google.com/webstore/detail/disable-keyboard-shortcut/aidbmcboeighgdnilpdljbedbbiocphj) and go to chrome://extensions/shortcuts and click on the pen and safely do CTRL+W and then you can sprint in the game!
We know that ctrl+W can be re-binded with a chrome extension. However, this will not be accepted, as mentioned here: https://github.com/PrismarineJS/prismarine-web-client/pull/239#pullrequestreview-799596125
I just found this experimental feature: https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock - might be useful when implemented?
I just found this experimental feature: developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock - might be useful when
Hi! You're absolutely right!! This is the only way to cancel ctrl+w as you handle all keyboard interactions (except for long-esc, btw google remote desktop uses this API). The lock can be acquired when you go fullscreen, so I implemented the following:
Also, acquiring full keyboard access can fix ua errors when re-requesting pointerlock (the pointer is not locked when you double press esc too fast without fullscreen)
Btw another annoying thing that I've found is mouse acceleration but it was to fix with Mouse Raw Input (setting), which btw is enabled by default in java version. And also I managed to fix all known control usability issues, so please let me know if there are any problems...
All this fancy stuff is supported only in Chromium browsers, so I don't recommend using others like Firefox...
All this fancy stuff is supported only in Chromium browsers, so I don't recommend using others like Firefox...
I mean... there are pretty good reasons to use FF instead of Chromium-based browsers. In fact, not supporting as many APIs is one of the reasons to use it, since Google has been known to use its dominant market share to do some pretty unethical stuff.
Nonetheless, in this case, IDK why Firefox doesn't support it. I can't think of any good reason.
Nonetheless, in this case, IDK why Firefox doesn't support it. I can't think of any good reason.
Because as your linked page says, it's not a standardized API. It's Google's proposal that for the time being only their Chrome browser implements.
It's absolutely a standardized API. It is a draft, so it's subject to change. That might be why. A config option like what's done for the Audio Output Devices API would be nice.
It's absolutely a standardized API. It is a draft, so it's subject to change. That might be why. A config option like what's done for the Audio Output Devices API would be nice.
Yes, I don't think you understand what a draft in the W3C standardization process is. It's the lowest level maturity level in the standardization track. Only "Recommendations" are standardards for the web. This means, if you are building a web browser, in order to fully implement the W3C standard you must implement those W3C recommendations.
I mean... there are pretty good reasons to use FF instead of Chromium-based browsers.
I might agree with you at some point, but for now, I don't really understand why you have to use ff instead of chromium-based solutions. Though I understand people who have to use safari: you get better performance on mac and you have simply no other choice on IOS. I'm personally using these APIs in the game and I enjoy using them.
Only "Recommendations" are standards for the web
This is also the right point, but in fact, we still do get not a feature-complete browser to use. Some websites like vscode.dev are simply not usable in Firefox (there is simply no way to work with fs effectively without FileSystemHandle support.
This means, if you are building a web browser, in order to fully implement the W3C standard you must implement those W3C recommendations.
This does not mean that you can't implement them. It just means that you don't have to (and IIUC that the API can change at any time).
We're off topic. I will not be replying to any subsequent comments here.
people try to use ctrl+w for sprinting
what can we do to make this less confusing?