shineworld 73 Posted May 24, 2021 (edited) Hi all. I'm on a PC with the Italian language and an Italian true keyboard. In the VCL software, I would like to use the TTouchKeyboard. Is a technical software where I need to force TTouchKeyoard to display US keyboard layout, because chars as [ ] | # etc are mandatory instead of accented èéòàù of specific Italian layout. I've imported the Vcl.Touch.Keyboard.pas in project to add minor graphics changes, which works fine, but I'm not able to understand how to force English layout. I've tried to change CreateKeyboard method to say "use alwyas 'en' but doesn't works. function TCustomTouchKeyboard.CreateKeyboard(const Language: string): Boolean; var Index, RowIndex, ColIndex: Integer; Button: TCustomKeyboardButton; LeftPosition, TopPosition: Integer; KeyboardState: TKeyboardState; KeyboardLayout: TVirtualKeyLayout; Row: TVirtualKeys; FoundCaps: Boolean; _Language: string; begin Result := False; FoundCaps := False; for Index := 0 to FButtons.Count - 1 do FButtons[Index].Free; FButtons.Clear; FDeadKey := VKey(-1, -1); TopPosition := 0; _Language := 'en'; if _Language <> '' then FLanguage := _Language; The result is always: There is a way to force it ? Edited May 24, 2021 by shineworld Share this post Link to post
FPiette 385 Posted May 24, 2021 Sorry but it looks you have an English layout. What did I miss in your post? Share this post Link to post
shineworld 73 Posted May 24, 2021 (edited) This is the "English" layout that I mean: I can obtain this layout "forcing" the entire system to use US keyboard layout language instead of "IT" with: ActivateKeyboardLayout(67699721 {en-US}, 0); Application.ProcessMessages; TouchKeyboard1.Redraw; but I wouldn't change how the physical keyboard works, overall the native customer keyboard, for eg. is Japanese and would use a physical keyboard to edit strings, but only the TTouchKeyboard component layout. Edited May 24, 2021 by shineworld Share this post Link to post
Der schöne Günther 316 Posted May 25, 2021 That's what I do as well: I just change the systems keyboard layout so the TTouchkeyboard will follow. When not longer needed, you can also unload the English keyboard layout again so it will not show up ion the users language list ([Win] + [Space]). I am doing a kiosk application however. I also wouldn't be comfortable with doing that in a regular application... Share this post Link to post
shineworld 73 Posted May 25, 2021 (edited) 2 hours ago, Der schöne Günther said: That's what I do as well: I just change the systems keyboard layout so the TTouchkeyboard will follow. When not longer needed, you can also unload the English keyboard layout again so it will not show up ion the users language list ([Win] + [Space]). Yes, I've already tried that, but, end-user will have a touch keyboard to enter code in the display panel + a physical keyboard (Japanese or Russian in this case) to enter texts in native Unicode mode. I need to have Windows working with Japanese or Russian native user language but the touch keyboard with the US for fast code editing in the display keybaord. I'm trying to understand TTouchKeyboard to "overload" how works o I will move to a custom keyboard component created from zero. Edited May 25, 2021 by shineworld Share this post Link to post
Der schöne Günther 316 Posted May 25, 2021 In that case I'm not sure if spending too much time with TTouchKeyboard is even worth the hassle. Design your own English keyboard on a TFrame, you have full control and flexibility here. Share this post Link to post