Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to automatically import a sharpkeys file? #542

Open
asherjacobson opened this issue Aug 1, 2023 · 1 comment
Open

Is there a way to automatically import a sharpkeys file? #542

asherjacobson opened this issue Aug 1, 2023 · 1 comment

Comments

@asherjacobson
Copy link

asherjacobson commented Aug 1, 2023

I am trying to automate the setting up of new computers which I have to do frequently. Assuming I have a sharpkeys file locally, how could I get the app to read from that file or "import" it from a UI perspective? I am ok with powershell, or other means. I figured maybe there is a filepath I can move the file to in which the application would know to read from it, upon restart/log out and back in. Thank you

@randyrants
Copy link
Owner

I would direct you to use the Registry Editor itself. I mean, I may have coded "open SharpKeys with this SKL file preloaded" but I don't remember. I likely didn't because the Registry does a better job of it and you'd have to reboot anyway, making the "preloaded SKL" file misrepresent itself as "this is what is currently remapped."

Since SharpKeys is simply a very custom Registry Editor of sorts, what I've historically done is:

  • Set up the keys I want remapped (minimally disabling Caps Lock)
  • Export the Key and Value to a REG file
  • Merge the REG file on each new machine

The Key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
The Value is "Scancode Map" - when you export the key above some other stuff comes with it: you can remove from the REG file since Scancode Map is the part you want to merge in.

The REG for turning off Caps Lock is this:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00

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

No branches or pull requests

2 participants