Skip to content

API.SystemParametersInfo(API.SPI_SETDEFAULTINPUTLANG returning false #6

Description

@glmnet

In my system, Windows 10, this is not working. I have two Spanish layouts and one English. I don't know if this is the cause. I got Assertion fail in SetDefaultLayout and GetLastError returns 5.
I managed to get it working by sending the hkl value received from API.GetKeyboardLayoutList instead of the one "generated" like this IntPtr hkl = new IntPtr(unchecked((int)((uint)layout << 16 | (uint)layout))); and then it kind of works.
I had made several changes to this to work but then the save config.txt needs more work so I'm not PRing this, I might do it later or branch it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions