Skip to content

Add a shortcut key to toggle the UI when fullscreen#6481

Merged
OBattler merged 4 commits into
86Box:masterfrom
Thraka:showui
Nov 18, 2025
Merged

Add a shortcut key to toggle the UI when fullscreen#6481
OBattler merged 4 commits into
86Box:masterfrom
Thraka:showui

Conversation

@Thraka

@Thraka Thraka commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

Summary

I love to work fullscreen. However, I hate going windowed just to insert a disk or cd rom. This PR adds the shortcut key of CTRL+ALT+PGDN to toggle the UI while in full screen. When it's toggled, the mouse is released (if it was captured) and the shortcut then hides the UI again, restoring the mouse to its previous state.

I'll be 100% transparent, I had Copilot write this code using Claude Sonnet 4.5. I'm a C# dev, but I rarely dive into C++. So I'm able to follow the code and understand it, debug, etc. But I just don't generally write it.

Checklist

References

Nothing

@Cacodemon345

Copy link
Copy Markdown
Contributor

Works fine, except our keyboard emulation and Bus/PS/2 mouse emulation does an extraneous check for fullscreen that will not work properly if the UI is on while fullscreen. It should be accounted for. Everything else seems fine.

@Thraka

Thraka commented Nov 16, 2025

Copy link
Copy Markdown
Contributor Author

OK this was adjusted to account for those fullscreen checks in those hardware files. The variable was also converted to a C int to match the way the "fullscreen" flag is implemented.

@OBattler

OBattler commented Nov 16, 2025

Copy link
Copy Markdown
Member

Undefined variables in the SDL builds:

/usr/bin/ld: src/device/CMakeFiles/dev.dir/keyboard.c.o: in function `keyboard_input':
/home/runner/work/86Box/86Box/src/device/keyboard.c:375: undefined reference to `fullscreen_ui_visible'
/usr/bin/ld: /home/runner/work/86Box/86Box/src/device/keyboard.c:375: undefined reference to `fullscreen_ui_visible'
/usr/bin/ld: src/device/CMakeFiles/dev.dir/mouse_bus.c.o: in function `bm_update_data':
/home/runner/work/86Box/86Box/src/device/mouse_bus.c:546: undefined reference to `fullscreen_ui_visible'
/usr/bin/ld: /home/runner/work/86Box/86Box/src/device/mouse_bus.c:546: undefined reference to `fullscreen_ui_visible'
/usr/bin/ld: src/device/CMakeFiles/dev.dir/mouse_bus.c.o: in function `bm_poll':
/home/runner/work/86Box/86Box/src/device/mouse_bus.c:484: undefined reference to `fullscreen_ui_visible'
/usr/bin/ld: src/device/CMakeFiles/dev.dir/mouse_bus.c.o:/home/runner/work/86Box/86Box/src/device/mouse_bus.c:484: more undefined references to `fullscreen_ui_visible' follow

@Thraka

Thraka commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

Thanks, I hadn't realized that was a thing. I thought it was all QT. I moved it to the root 86box.c.

@OBattler
OBattler merged commit 7db9cb2 into 86Box:master Nov 18, 2025
45 checks passed
@usergithub64

usergithub64 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

This PR adds the shortcut key of CTRL+ALT+PGDN to toggle the UI while in full screen. When it's toggled, the mouse is released (if it was captured) and the shortcut then hides the UI again, restoring the mouse to its previous state.

Please, can you add another option to the menu? Automatically capture mouse in fullscreen mode when the machine is started with the -F parameter (when the machine is started immediately in fullscreen mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants