I work with the TAdvSmoothPopUpTouchkeyboard since a few weeks and have a question about setting key states.
You gave an example for setting the CAPSLOCK key with AdvSmoothTouchKeyBoard1.PostKey(VK_CAPITAL, [], true, 28);
I don't want to set the CAPSLOCK but the SHIFT key for having only the first character in an input being uppercase as the SHIFT key switches back to off after typing one other key.
I tried AdvSmoothTouchKeyBoard1.PostKey(VK_CAPITAL, [], true, 41); and AdvSmoothTouchKeyBoard1.PostKey(VK_SHIFT, [], true, 41);
even AdvSmoothTouchKeyBoard1.PostKey(VK_SHIFT, [ssShift], true, 41); (41 is the index of the left SHIFT key in my keyboard)
None of them worked.
Is it even possible to set the SHIFT key to on programmatically?
You can turn on the shift key with the following code AdvSmoothTouchKeyBoard1.Shift := [ssShift]; Then only the first key that has been clicked on the touch keyboard will be upper-case, the shift will then automatically be turned off
thanks for your answer but unfortunately it activates the CAPSLOCK. And this is not automatically turned off after the first key. I'm using Delphi Tokyo 10.2 (w/o Release 1) and AdvSmoothTouchKeyboard version 1.8.5.1
It's not TadvSmoothPopUpTouchKeyboard as I falsely mentioned in the first post. Sorry, if that was misleading!
We have tested this here and in the constructor of the form, with a default TAdvSmoothTouchKeyboard, it activates the shift key, and is turned off when clicking another key, after focusing an editable control
the behavior you describe is exactly what I'm looking for, but sadly it does not work on my machine.
I had the AdvSmoothTouchKeyBoard1.Shift := [ssShift]; in a function called every input fields onEnter method but changed that to FormCreate as you suggested.
Did not work. It is always CAPSLOCK that is activated.
I had removed some keys from my keyboard component (Ctrl, Win; Alt, Alt Gr, Win, Menu). So I thought that might be the problem, but it did not work with a completely new keyboard component either.
I know the experience "works on my machine" but this time it's the other way round for me.
If you have a project where it is not working, please send us the project so we can investigate this here. Other than that, it's unclear exactly what is the difference between the 2 projects. You could compare the DFM files to be 100% sure there are no differences in the key collections.