Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - DeathRay2K

Pages: [1]
Feature requests / Toggle Virtual Keyboard on Windows
« on: December 09, 2016, 07:35:10 pm »
It would be good to have a Windows implementation of setVirtualKeyboardVisible, particularly for touchscreen Windows devices.
Keyboard.hpp notes that not all OSes have virtual keyboards and so the function may be OS-dependent, but Windows does have this support and there are many touchscreen Windows devices without keyboards.

Use case:
I have a program that supports Windows tablets and includes text input fields. I want a tap on a text input field to bring up the virtual keyboard automatically, because the virtual keyboard toggle in the Start menu is at best inconvenient, and at worst inaccessible in a full screen program.

To enable this use case completely requires implementation of keyboard detection, as you would not want the virtual keyboard coming up on a keyboard-connected device.

Feature requests / Add Keyboard/Mouse connection detection
« on: December 09, 2016, 07:26:21 pm »
It would be useful to be able to check if a keyboard or mouse is or is not connected to the computer.

My use case is this:
I have a Windows program with UI, when a user is using a mouse, I want them to activate hover events, and when they are using a touch screen, I don't want to activate hover events.
The way Windows emulates mouse inputs with a touchscreen makes this impossible in SFML, as the MouseMove event is triggered so it appears the mouse is hovering over a button after the tap completes.

Another use case:
I have a mobile app with text input fields. I want to bring up the virtual keyboard when the user taps on an input field, unless they have a physical keyboard connected to their device.
I believe this is currently impossible in SFML, but I don't develop for Android/iOS so correct me if I'm wrong.

I think it makes the most sense to be able to poll the connection status in sf::Mouse and sf::Keyboard.
Alternatively a rework of the Mouse and Keyboard classes to bring them closer to how Joysticks are implemented might make sense, as it would allow multiple keyboards and mice to be detected as well. I realise that would at least have to wait for SFML3, and may not be a common enough scenario to warrant the effort.

Pages: [1]