joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.78k stars 381 forks source link

Soft keyboard, mouse(s), joystick(s); emulate LED indicators #3636

Open Torinde opened 2 years ago

Torinde commented 2 years ago

Is your feature request related to a problem? Please describe.

Can't type certain keys/combinations PrtScr, Pause/Break, F11, ... #3628, #3231 Don't see status Numlock, Capslock, etc. Don't have indicator on activity

What you want

  1. Emulate LED indicators - Numlock, Caps Lock, Scroll lock - maybe in the menu bar of DOSbox + overlayed in user-selectable place when in fullscreen (and the place to be outside the 4:3 DOSbox area, e.g. utilize empty black space of widescreen monitors). Some DOS/Win9x programs and games manipulated those LED indicators (e.g. flashing with certain frequency in sync with some event/status, use as 4 step progress-bar, etc.). Example. Alternative way to show it - influence host keyboard LED indicators #3634 (but many modern wireless keyboards are without indicators and many modern keyboards don't have their indicators in a "proper row"). image
  2. Emulate LEDs of front panel: Power, HDD activity, Turbo, 7-segment value = CPU cycles or MHz), FDD activity, CD/DVD activity, Network LED activity. Other 'new metrics' - host/guest utilization CPU/GPU/RAM, RAM read/write, HDD read/write.
  3. Noise emulation of HDD/FDD/CD. Both noise and LED activity indicators were often a clue when a new area/monster boss/attack/something is being loaded in a game. Also a clue if the program has frozen/completed long action. #4542, Fax/modem sounds emulation
  4. Also show which media slots are filled and with which image(s)/folder(s)/etc. and provide dropdown for quick selection - eject button FDD/CD, with dropdown menu for selecting recently utilized images (from top menu, from mount/imgmount, etc.) + "select path…" #3545 #3486
  5. Also show info about booted Guest OS.
  6. Power indicator to have a watchdog to turn into red ring of death if DOSbox-X had frozen. At least some indicator of activity/"not frozen" in the title bar. Currently (with no HDD/network/etc. activity indicators) it's often unclear if it's frozen or performing an action requiring a lot of time. #3572
  7. dosbox-staging/dosbox-staging/issues/794
  8. Emulate front buttons - Turbo+/- (cycles), Reboot guest OS, Reset VM, Restart DOSbox-X, Power OFF (Quit DOSBox-X), "CD buttons": volume+/- (general volume or ONLY CD/DVD/BD playback), audio out "jack" (selector to choose which of the Host audio outputs DOSbox-X output should be redirected to, e.g. Host uses as primary the integrated speakers, but DOSBox-X goes to Bluetooth headphones; general audio or ONLY CD/DVD/BD playback), eject/stop, play/next (some of these are duplicative with the Win9x multimedia keys)
  9. in the empty space on the sides present also a full keyboard, mouse(s), joystick(s) - so that the user can "send key to DOSbox" by clicking (also support combinations - Ctrl+X, LeftMouse+MoveMouse/dragging, etc.). Useful for laptop keyboards that don't have numpad, break, insert, home/end or PgUp/PgDn and other keys. Also for N-key rollover. Keyboard mapper is kind of cumbersome - compared to an ad hoc immediate "send this key I clicked on" without prior preparation of mapper file, etc. Soft keyboard from Virtualbox - split in two (QWERTY left, arrows+Numpad right), multimedia keys, user to be able to rearrange the position of the keys/buttons/axes (soft touchpad/D-pad/analog-stick) (e.g. arrows on the right, WASD/QAOP/something else on the left - game/application specific) - useful also for Android ports (#959) and touchscreen devices in general (laptops, Surface)
  10. DOSbox-X menu bar (and individual commands thereof) also to be able to be shown
  11. Soft mouse(s) - like the Windows soft touchpad - rectangular area + 3/4/5 buttons + horizontal/vertical scroll via two fingers (or one finger on the sides). Mapper currently doesn't have mouse XY-axes, horizontal/vertical scroll. @aybe
  12. Soft joystick(s) - like 'push-circle' phone touchscreen game interfaces
  13. Joystick/Mouse emulation in guest by using host keyboard
  14. any-to-any mapping (host/guest, mouse/keyboard/joystick) dosbox-staging/dosbox-staging/issues/583 ThinkPad-like Trackpoint as Joystick. Host gamepad1 as joystick, host gamepad2 as mouse2 #2412, #4955, etc. @aybe
  15. Translucently overlay over the DOS content (e.g. user touches on those spots get captured by the virtual keyboard/mouse and not by the DOS mouse driver) - if user wants to click that region in DOS - has to move the overlay elsewhere first.
  16. Detached floating window option - instead of the blank sides during full screen
  17. On the sides of the DOSbox-X window - when in window mode
  18. Soft keyboard/Indicators/Information to be entirely on the left OR right, while DOS content - on the other side. Instead of DOS content being in the middle and keyboard being split. Both for window mode and full screen.
  19. Which of all those to be shown, Order/Shape/Size/Colors/Intensity/Label to be user configurable, e.g. if somebody wants only a Lock keys indicators in the most non-distracting color - to be able to get that without all the rest, customization ability is required due to the variety of aspect ratios (from 3:2 Surface Pro with thin vertical bars on the sides to 32:9 Super Ultrawide displays with a lot of empty space on the sides).
  20. Examples to start with: DOSbox-X mapper, VirtualBox soft keyboard, DOSbox Pure on-screen keyboard, Pure/RetroArch examples image

Please let me know if such requests are better to be split in separate issues.

Mockup: image

Describe alternatives you've considered

No response

Additional information

No response

Have you checked that no similar feature request(s) exist?

Code of Conduct & Contributing Guidelines

Torinde commented 1 year ago
Jkapp76 commented 1 year ago

I love the idea of LED lights on-screen in full-screen mode. HDD and FDD and so on. I like the FDD and HDD sounds too, but that might be a hard sell.

I remember in those old Telarium/Trillium games you could tell a monster was coming by the disk drive loading up the graphic data. I'd hear the disk noise and wait for the picture. This anticipating what's coming aspect is missing in emulation.

Torinde commented 1 year ago

Host Mouse to Guest Gamepad in QEMU USB Gamepad

johnnovak commented 1 year ago

That is quite a laundry list of ideas πŸ˜… It will surely keep us busy for the next 5 years at least! πŸ˜„

I'm not against some of these, but the end result should be still sleek and aesthetic. I don't want the OSD to look like a Christmas tree 😏 Probably we can try introducing a subset of these gradually, judiciously weighing up the relative importance of the added benefits vs the extra clutter, usage of screen space, and added maintenance effort for each feature.

Also, my philosophy is that feature bloat is not desirable; anyone can add all the features... Adding only the right set of well-chosen features that work nicely together and don't overload the user unnecessarily, that's an art.

See the main discussion & plans about the OSD feature here: https://github.com/dosbox-staging/dosbox-staging/discussions/1953

Torinde commented 1 year ago

Agree with gradual approach. Agree my mockup isn't pretty - I just try to illustrate some of the ideas. Because tastes/requirements differ (especially those related to how much space your monitor has on the sides) - I think item 19 is crucial: "customization ability"... which also solves the danger of becoming a "Christmas tree", e.g. user can simply disable (actually "not enable" since by default I expect most to be off) whatever he feels is superfluous?

johnnovak commented 1 year ago

Agree with gradual approach. Agree my mockup isn't pretty - I just try to illustrate some of the ideas. Because tastes/requirements differ (especially those related to how much space your monitor has on the sides) - I think item 19 is crucial: "customization ability"... which also solves the danger of becoming a "Christmas tree", e.g. user can simply disable (actually "not enable" since by default I expect most to be off) whatever he feels is superfluous?

Definitely, agree on all those: start small, introduce things gradually, and make things customisable (within reasonable limits) πŸ‘πŸ»

Jkapp76 commented 1 year ago

I think emulating the HDD and FDD LEDs would be fine to just have a Red and Green dot in the lower corner that completely disappears when there's no activity. No label at all, just a colored mark.

I'm less interested in the caps lock and scroll lock indicators, but I think they'd be best to only show when there's a status change. Just appear for 2 seconds after pressing caps lock.

I know it sounds nerdy, but I'm also really interested in the drive sounds. I wouldn't care if it's that accurate myself, just a rumble sound through the PC speaker while the data is loading to let me know those monster images are loading.

Jkapp76 commented 3 weeks ago

I think having an area in the side border for LEDs would be great. Floppy and HDD lights too.

LightningStalker commented 2 weeks ago

Similar problem. Linux desktop host numlock and dosbox-x emu numlock out of sync. A bit tiring to press numlock every time when switching back and forth. CONFIG.SYS settings do nothing.

johnnovak commented 2 weeks ago

Probably needs the use of platform-specific APIs to determine and change the current NumLock, CapLock and ScrollLock states, e.g. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getkeystate?redirectedfrom=MSDN