Recently, I've been experimenting with a Macro Deck, a simple programmable "keyboard" that can utilize an old Android tablet I already have to solve some practical problems or needs.
Like, what keyboard I'm using right now ?
I'm Slovak, but as a programmer, I use the English (US) keyboard layout for coding and the Slovak QWERTY layout for the Slovak language. There's also the Slovak QWERTZ layout, which is the standard, and sometimes I use Czech or German layouts just for specific words usually.
So, which keyboard layout is active after I press Windows + Space? That's the question.
So I set up my tablet and Macro Deck, with that Windows + Space , and of course a was trying to set up a label for a Macro Deck "button" to show me name of keyboard layout. There si a way to use plugins, but there is no plug in suitable, or simply I was not able to find one, so there is command line. But no AI, I mean Copilot with GPT 5.1 or Gemini 3.0, was able to prepare functional PowerShell script. I tried many times. So c# it is ... Of course some debugging was needed to get proper label by binary date returned by system, but it works. But c# exe was somehow big so I created also c++ version which is significantly smaller.
So here it is
https://github.com/gasparovicm/KeyboardName/
No comments:
Post a Comment