Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the "slow-down-camera" modifier to Alt on non-Mac #3051

Merged
merged 3 commits into from Aug 31, 2023

Conversation

h3mosphere
Copy link
Contributor

@h3mosphere h3mosphere commented Aug 20, 2023

This Fixes #1867. Setting Alt as the slowdown behaviour for the camera movement. Note, that this also sets it to alt for wasm architecture, let me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

What

Checklist

@h3mosphere h3mosphere force-pushed the slow-down-is-alt-on-non-macos branch from c43092a to 9b47c4d Compare August 20, 2023 06:31
@emilk
Copy link
Member

emilk commented Aug 21, 2023

Thanks for the PR!

It is desirable to keep the same shortcuts natively as on the browser on the same computer. To that end we would need to change the compile-time switch in this PR to a runtime switch. You can use ui.ctx().os() to get the current OS (even on web). SLOW_DOWN_3D_MODIFIER would thus need to be turned into a function taking egui::os::OperatingSystem as an argument.

@emilk emilk changed the title Slow down is alt on non macos Change the "slow-down-camera" modifier to Alt on non-Mac Aug 21, 2023
@emilk emilk added the 📺 re_viewer affects re_viewer itself label Aug 21, 2023
@h3mosphere
Copy link
Contributor Author

OK, that was easy enough.

There are some new problems with both Alt-E, and Ctrl-E being captured by the browser, but native is probably more important (it is to me anyway), and this problem exists regardless (current behaviour is broken with Ctrl-E in chrome on linux).

This also updates the help text, in which the displayed modifiers were reversed to what they actually are.

…ime what camera movement slow down modifier key.

This presents new problems with Alt-E being a browser shortcut in chrome to bring up the main menu, but so also is Ctrl-E being focus the url bar.
@h3mosphere h3mosphere force-pushed the slow-down-is-alt-on-non-macos branch from 8891177 to 1b599ef Compare August 22, 2023 10:20
@Wumpf
Copy link
Member

Wumpf commented Aug 23, 2023

Anything missing before we get this in, meaning getting it out of draft?

@Wumpf Wumpf added this to the 0.8.2 milestone Aug 25, 2023
@emilk emilk marked this pull request as ready for review August 31, 2023 12:45
@emilk emilk added the ui concerns graphical user interface label Aug 31, 2023
@emilk
Copy link
Member

emilk commented Aug 31, 2023

cargo cranky passes locally - LGTM!

@emilk emilk merged commit 990a625 into rerun-io:main Aug 31, 2023
20 of 27 checks passed
jleibs pushed a commit that referenced this pull request Aug 31, 2023
This Fixes #1867. Setting Alt as the slowdown behaviour for the camera
movement. Note, that this also sets it to alt for wasm architecture, let
me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

* [X] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [X] I've included a screenshot or gif (if applicable)
* [X] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: hemosphere <hemosphere@proton.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
jleibs pushed a commit that referenced this pull request Aug 31, 2023
This Fixes #1867. Setting Alt as the slowdown behaviour for the camera
movement. Note, that this also sets it to alt for wasm architecture, let
me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

* [X] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [X] I've included a screenshot or gif (if applicable)
* [X] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: hemosphere <hemosphere@proton.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
jleibs pushed a commit that referenced this pull request Aug 31, 2023
This Fixes #1867. Setting Alt as the slowdown behaviour for the camera
movement. Note, that this also sets it to alt for wasm architecture, let
me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

* [X] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [X] I've included a screenshot or gif (if applicable)
* [X] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: hemosphere <hemosphere@proton.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
@jleibs jleibs mentioned this pull request Aug 31, 2023
3 tasks
jleibs pushed a commit that referenced this pull request Aug 31, 2023
This Fixes #1867. Setting Alt as the slowdown behaviour for the camera
movement. Note, that this also sets it to alt for wasm architecture, let
me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

* [X] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [X] I've included a screenshot or gif (if applicable)
* [X] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: hemosphere <hemosphere@proton.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
jleibs pushed a commit that referenced this pull request Aug 31, 2023
This Fixes #1867. Setting Alt as the slowdown behaviour for the camera
movement. Note, that this also sets it to alt for wasm architecture, let
me know if you wish for an extra check for wasm (and leave it as alt).

Thanks.

* [X] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [X] I've included a screenshot or gif (if applicable)
* [X] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: hemosphere <hemosphere@proton.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using WASD+EQ with Ctrl Modifier results in program exit & save file.
3 participants