How to send ALT-TAB inside PCEM?

Support and general discussion.
Post Reply
User avatar
davidinark
Posts: 6
Joined: Sun 24 Mar, 2019 7:26 am

How to send ALT-TAB inside PCEM?

Post by davidinark »

How do you send the ALT-TAB command INSIDE the PCEM environment, so I can switch between apps running inside PCEM (Windows 98)?
eddman
Posts: 74
Joined: Wed 09 Feb, 2022 9:30 am

Re: How to send ALT-TAB inside PCEM?

Post by eddman »

You're right, I never noticed this before. Alt-tabbing in pcem does show the selection box for a brief second but then the host windows takes over.
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: How to send ALT-TAB inside PCEM?

Post by ruben_balea »

If you're in a fullscreen program you can click alt+tab once to get back to the Windows 98 desktop inside PCem, on your real computer Windows will also switch from PCem to any other window but you can use the mouse to return to PCem, then inside PCem you can use the mouse again to return to the fullscreen program by clicking on its taskbar button or do the same to select any other window.

:idea: Note for devs: The left WINDOWS (logo) key could be remaped as ALT, of course only when used in combination with TAB (that is, when you press TAB one or more times before releasing the WINDOWS key, the same way ALT works for the ALT+TAB combination) because it is the closest key on the keyboard and no program that I know of uses the WINDOWS+TAB combination.
User avatar
YourHotGothAunt
Posts: 1
Joined: Sat 07 Jan, 2023 5:25 am

Re: How to send ALT-TAB inside PCEM?

Post by YourHotGothAunt »

ruben_balea wrote: Sun 27 Feb, 2022 2:54 amand no program that I know of uses the WINDOWS+TAB combination.
I can think of one program in particular that uses that key combination - modern Windows. Specifically, anything since Windows Vista, although the exact behavior varies:
- Vista, 7, and I think both 8 and 8.1 activate "Aero Flip", which is a really cool graphical task switcher that didn't get as much love as it should have due to being on a non standard task switching hotkey.
- Windows 10 and 11 spin up a different task switcher entirely, with access to the virtual desktop subsystem introduced within 10.

The real solution is programming PCem to suppress Alt-Tab behavior in the host (perhaps only when the mouse is captured?). This can, for an absolute fact, be done, because many modern video games and most emulation solutions for more modern machines have this functionality. I'd submit the PR myself but I think it requires better abilities with Win32 API calls than I currently have.
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: How to send ALT-TAB inside PCEM?

Post by ruben_balea »

PCem captures the Windows key so Windows shouldn't show the task switcher... but I'm not sure if any Windows version takes preference over PCem for the Windows key, I have been using only Windows 10 ever since it was offered as a free upgrade.

Anyway, by the time a solution is implemented it can give users the option to choose between Alt+Tab, Windows+Tab or any other combination that each one prefers, I don't think it requires too much additional code to make it customizable.
Post Reply