[Lazarus] Keyboard info

Marc Weustink marc at dommelstein.nl
Thu Feb 5 20:45:34 CET 2015

On February 5, 2015 12:49:44 PM CET, Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
>Mattias Gaertner wrote:
>>>>> How can a program get a general idea of the current keyboard
>>>>> i.e. (primarily) whether the operating system thinks it's in
>America or 
>>>>> the UK, and (secondarily) whether it's QWERTY or e.g. Dvorak?
>>>> Under Linux/X?
>>> Principally yes, but if it gave hints under other OSes it would be
>>> on the cake.
>> For X:
>> setxkbmap -print
>> or via program
>> https://github.com/nonpop/xkblayout-state
>Thanks, noted the program stuff which looks useful. I admit that I was 
>rather expecting to be pointed brusquely at some existing LCL or FCL 
>stuff... can I get e.g. current country from locale stuff, and where do
>I find it?

There isn't. The attached keyboard is in no way related to a locale. Even if you know the country, there may exist multiple layouts.

it took me a lot of work to only extract the necessary info to generate the correct VK_ codes


More information about the Lazarus mailing list