Author Topic: QMK - VIA programming and keyboard macros  (Read 23849 times)

0 Members and 1 Guest are viewing this topic.

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
QMK - VIA programming and keyboard macros
« on: Sun, 07 June 2020, 18:45:09 »
I would like to know what kind of macros I can program on my keyboard.

I understand that I can add macros with some key combinations, but is it possible to program some more complex macros?
For example a command to create new folder with today's date. Is something like that possible?


**** EDIT 08/01/21:
I got new QMK keyboard and trying to add pound sign to ANSI layout.
« Last Edit: Thu, 25 March 2021, 07:51:35 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline 4sStylZ

  • Posts: 127
Re: Keyboard Macros
« Reply #1 on: Mon, 08 June 2020, 08:39:19 »
Depend on your keyboard…

Is it a QMK firmware based, is it a Razer ?

When I was younger I was using macro for mmorpg to make some hard and precise sequence of action.
Now I use them for proffessionnal / multimedia shortcut that I use all days : 

 - Select all (Shift + A)
 - Select current row (Home then Shift + End)
 - Select current word (Ctrl left then Shift + right arrow)
 - Cut (Left shift + Delete)
 - Copy (Left ctrl + insert)
 - Paste (Left shift + insert)
 - alt tab cycle with one key (search for super alt tab on the QMK documentation)
 - lock my computer if I press multiple keys at once like a horse (it's just so fun to say : Ok go for a coffee and then smash the keyboard like a retard). I use the combo feature of QMK.
 - a single key to type « 00 ».
Bépo user here : AEK64 White linear dampened, XD75 Cherry Blue Jailhoused, TypeMatrix2030 black skin, Lenovo 0B47200 w/ trackpoint, G13, G512. Kensington Expert Trackball & Orbit, Magic touchpad 2.

Offline jamster

  • Posts: 1091
  • Location: Asia
Re: Keyboard Macros
« Reply #2 on: Mon, 08 June 2020, 09:58:54 »
For anything more than simply repeating some key strokes, might it be an idea to use a keyboard macro to trigger an OS level batch file or script instead? It's probably going to be more flexible and easier to write.

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #3 on: Mon, 08 June 2020, 11:04:35 »
Depend on your keyboard…

Is it a QMK firmware based, is it a Razer ?

When I was younger I was using macro for mmorpg to make some hard and precise sequence of action.
Now I use them for proffessionnal / multimedia shortcut that I use all days : 

 - Select all (Shift + A)
 - Select current row (Home then Shift + End)
 - Select current word (Ctrl left then Shift + right arrow)
 - Cut (Left shift + Delete)
 - Copy (Left ctrl + insert)
 - Paste (Left shift + insert)
 - alt tab cycle with one key (search for super alt tab on the QMK documentation)
 - lock my computer if I press multiple keys at once like a horse (it's just so fun to say : Ok go for a coffee and then smash the keyboard like a retard). I use the combo feature of QMK.
 - a single key to type « 00 ».

..like a horse  :)) :)) :))
Cool :D
Yeah, so talking about QMK/VIA.
I understand you can do it with combo of keys, but what about some more complex macros?
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #4 on: Mon, 08 June 2020, 11:07:28 »
For anything more than simply repeating some key strokes, might it be an idea to use a keyboard macro to trigger an OS level batch file or script instead? It's probably going to be more flexible and easier to write.

That's the thing - this is what I do currently - I have banch of script files, but I want them to be "in" keyboard, so when I take them home, work or wherever, I can use those macros.
For example the one I use often - creating a folder with today's date.

Could I add a macro that normally I run from bat file, like this line: md %date:~8,2%-%date:~5,2%-%date:~0,4%
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #5 on: Tue, 09 June 2020, 04:33:37 »
The keyboard doesn't know the date but I think if you type 'cmd' or 'powershell' in the address bar to launch it in the current current location, then a pause, then type the above to make the folder, then whatever it takes to kill the shell window you will get what you want?  Only downside compared to manual is it won't be selected.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #6 on: Tue, 09 June 2020, 08:06:11 »
The keyboard doesn't know the date but I think if you type 'cmd' or 'powershell' in the address bar to launch it in the current current location, then a pause, then type the above to make the folder, then whatever it takes to kill the shell window you will get what you want?  Only downside compared to manual is it won't be selected.

Yes, but would it work with keyboard macro?
I mean, can you set it up so it will open cmd window with current folder opened in wondow explorer, run the line and close cmd window?
So the final result would be created folder in window explorer folder I'm in?

Is something like that possible?
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #7 on: Tue, 09 June 2020, 10:22:07 »
Keyboards do one thing - type.  If you click in the address bar and then run the macro'd 'typing' above (including enter keys) it should work.  Give it a go.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #8 on: Tue, 09 June 2020, 12:42:22 »
Keyboards do one thing - type.  If you click in the address bar and then run the macro'd 'typing' above (including enter keys) it should work.  Give it a go.

OK, I know what you mean. So basically this may not be entirely possible then.
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #9 on: Tue, 09 June 2020, 13:14:10 »
Are some of your .bat files really long then?  I have no idea what limits there are for macro length or what other features you use (e.g. you can disable mouse keys in tmk to free up space), if you don't use RGB on this board maybe EasyAVR or Soarer's firmware would work better...

Please add your longest .bat so I can have a play in EasyAVR later, I'd have to research macros on the others so it will take too long for a worknight.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #10 on: Tue, 09 June 2020, 14:50:41 »
Are some of your .bat files really long then?  I have no idea what limits there are for macro length or what other features you use (e.g. you can disable mouse keys in tmk to free up space), if you don't use RGB on this board maybe EasyAVR or Soarer's firmware would work better...

Please add your longest .bat so I can have a play in EasyAVR later, I'd have to research macros on the others so it will take too long for a worknight.
Thanks dude, I appreciate it :)

Well, for starters, that line above, to create todays date folder.
But I dont know how this is gonna work, could I just click on windows explorer opened folder blank space to create it?

My first qmk keyboard- drop ALT- is coming in a week.
Never had programmable keyboard....
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #11 on: Tue, 09 June 2020, 18:40:52 »
Your first programmable board, how exciting!  You've been here so long I assumed you had one.  The Alt does have RGB so it will have to be QMK.

To get your head around macros you have to think how you do something using only a keyboard.  You could move the mouse to a white space (even though that's cheating :p) then press the 'menu' key, then some arrows to get to new -> folder but then you would have to type the name and you don't know what that is, so it wont work.

You do know how to make the folder in command prompt though so open the folder and try this, it's exactly what the macro will do:

-Press Alt+D (focus the address bar)
-type powershell and press enter
-paste/type the code from the .bat file, press enter
-type exit, press enter

You should now be back in explorer with the new folder ... wherever it gets put relative to whatever's already there.  Windows 7 doesn't like the contents of your .bat for me so I guess you're in 10?  It's that or there's something going on in the background when you run a .bat which can surely be worked around.

Edit:  Looked at the QMK documentation on macros, this seems to be the above in QMK speak
Code: [Select]
SEND_STRING(SS_LALT("d") SS_DELAY(100) "powershell" SS_TAP(X_ENTER) SS_DELAY(500) "md %date:~8,2%-%date:~5,2%-%date:~0,4%" SS_TAP(X_ENTER) SS_DELAY(100) "exit" SS_TAP(X_ENTER));
« Last Edit: Tue, 09 June 2020, 19:07:12 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #12 on: Wed, 10 June 2020, 02:28:50 »
Your first programmable board, how exciting!  You've been here so long I assumed you had one.  The Alt does have RGB so it will have to be QMK.

To get your head around macros you have to think how you do something using only a keyboard.  You could move the mouse to a white space (even though that's cheating :p) then press the 'menu' key, then some arrows to get to new -> folder but then you would have to type the name and you don't know what that is, so it wont work.

You do know how to make the folder in command prompt though so open the folder and try this, it's exactly what the macro will do:

-Press Alt+D (focus the address bar)
-type powershell and press enter
-paste/type the code from the .bat file, press enter
-type exit, press enter

You should now be back in explorer with the new folder ... wherever it gets put relative to whatever's already there.  Windows 7 doesn't like the contents of your .bat for me so I guess you're in 10?  It's that or there's something going on in the background when you run a .bat which can surely be worked around.

Edit:  Looked at the QMK documentation on macros, this seems to be the above in QMK speak
Code: [Select]
SEND_STRING(SS_LALT("d") SS_DELAY(100) "powershell" SS_TAP(X_ENTER) SS_DELAY(500) "md %date:~8,2%-%date:~5,2%-%date:~0,4%" SS_TAP(X_ENTER) SS_DELAY(100) "exit" SS_TAP(X_ENTER));

Yeah, well, I've here a while now, but 99% of the time I', a topre lover. I started my mech journey from CM quickfire rapid on mx blacks, then browns, but landed on Topre and it was always hard to find same refinement, if you know what I mean :)
Only mx switch I like now is Tealios v2 - so for a year now I've been waiting for Rama U80-A (hopefully will land on my desk this month) and now waiting for that Drop ALT - not a premium board, but its a gift and I never liked smaller formats than TKL, so will try to get used to 65%.

OK, so those moves - yeah, will try this when I get my keeb. I got what you mean by doing exact same moves with mouse and keyboard, then trying to replicate it with lines.

Right now I have this simple script programmed on my pc - bat file with that line + I added custom menu under right click button (regedit inserted):



It works great, but if I'm getting QMK keyboard, I would like to add loads of these and have them in the keyboard, which I will move from work to home etc.

Thanks again, I will look into that docs as well - never too old to learn new stuff! ;)
« Last Edit: Wed, 10 June 2020, 02:30:33 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #13 on: Wed, 10 June 2020, 04:58:50 »
It's long been said there's little to be gained from a 'premium' board, the closest I got is my acrylic CP-SQ.  If you like Topre that's great, if you can live with a TKL you've already sacrificed most of what's missing on a 65% so you should be ok.

Back on topic good work with the menu edit, something that really should be easier!  Methinks you're the kind of person who will find lots of uses for layers and macros :thumb:

It would be good if you could check that typing the contents of the .bat works though, or you could use this which is Windows 7 friendly and more readable?  Of course Windows 7 friendly may mean it works nowhere else

Code: [Select]
SEND_STRING(SS_LALT("d") SS_DELAY(100) "powershell" SS_TAP(X_ENTER) SS_DELAY(500) "md (get-date -format dd-MM-yyyy)" SS_TAP(X_ENTER) SS_DELAY(100) "exit" SS_TAP(X_ENTER));
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #14 on: Sat, 18 July 2020, 12:44:00 »
OK, so I have this keyboard now.
It is ANSI and I would like to add a pound sign to second layer, macro or whatever.
Its Rama U80-A, works with VIA, installed it and now I have access to layers etc

How can I do it?
« Last Edit: Sat, 18 July 2020, 12:47:12 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline TearTox

  • Posts: 1
Re: Keyboard Macros
« Reply #15 on: Sat, 18 July 2020, 13:50:50 »
OK, so I have this keyboard now.
It is ANSI and I would like to add a pound sign to second layer, macro or whatever.
Its Rama U80-A, works with VIA, installed it and now I have access to layers etc

How can I do it?
Have you tried shift+3 or altgr+3 or right alt + 3?

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #16 on: Sat, 18 July 2020, 14:01:20 »
OK, so I have this keyboard now.
It is ANSI and I would like to add a pound sign to second layer, macro or whatever.
Its Rama U80-A, works with VIA, installed it and now I have access to layers etc

How can I do it?
Have you tried shift+3 or altgr+3 or right alt + 3?

I'm trying to set a macro with ALTGr+numpad0+numpad1+numpad6+numpad3 = this should work but what it does its actually typing all those characters, instead of acting as pressing and holding ALTGr and pressing those numpad numbers...
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #17 on: Sat, 18 July 2020, 15:07:43 »
Have you tried this?

Code: [Select]
SEND_STRING(SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_6)SS_TAP(X_KP_3)));
Not sure if Num Lock needs to be on...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #18 on: Sat, 18 July 2020, 15:56:28 »
Have you tried this?

Code: [Select]
SEND_STRING(SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_6)SS_TAP(X_KP_3)));
Not sure if Num Lock needs to be on...

Ooo, let me try...

EDIT: I don't get it - it doesn't execute it, it "types" the whole code.
So instead of pound sign, I get SEND_STRING(SS_LALT(SS_TAP(X_KP_0)SS_TAP(X_KP_1)SS_TAP(X_KP_6)SS_TAP(X_KP_3)));
« Last Edit: Sat, 18 July 2020, 15:58:11 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #19 on: Sat, 18 July 2020, 16:31:16 »
Have you got another macro working?  Sounds like you've got the function inside another function...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #20 on: Sun, 19 July 2020, 05:24:19 »
Have you got another macro working?  Sounds like you've got the function inside another function...

Only those where it pastes some text, nothing with actual keycode.
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: Keyboard Macros
« Reply #21 on: Sun, 19 July 2020, 05:36:24 »
Have you got another macro working?  Sounds like you've got the function inside another function...

Only those where it pastes some text, nothing with actual keycode.

Are you putting that macro string into a QMK keymap files and manually compiling, or are you putting them into one of the macro boxes in the VIA configurator? If you’re using VIA when it has a more restricted, but less complex macro system - it will largely do autocomplete for you, but the equivilent macro chord would be something like:

{KC_LALT,KC_KP_0,KC_KP_1,KC_KP_6,KC_KP_3}

I’d I recall correctly (I’m not at my PC)
« Last Edit: Sun, 19 July 2020, 05:41:55 by -Jerry- »
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #22 on: Sun, 19 July 2020, 05:48:31 »
{KC_LALT,KC_KP_0,KC_KP_1,KC_KP_6,KC_KP_3}

I'm no expert but that looks like pressing four keys instead of holding the first while pressing the next three, as is required?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: Keyboard Macros
« Reply #23 on: Sun, 19 July 2020, 06:43:22 »
{KC_LALT,KC_KP_0,KC_KP_1,KC_KP_6,KC_KP_3}

I'm no expert but that looks like pressing four keys instead of holding the first while pressing the next three, as is required?

You're quite right *hangs head in shame* I was getting confused because I managed to get a hash keycode working with {KC_LALT,KC_P3,KC_P5} as the macro on the keyboard I built for my wife, so I was thinking that the same would work, but apparently not.
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: Keyboard Macros
« Reply #24 on: Sun, 19 July 2020, 06:52:02 »
I’ve never tried it, so I’ll give it a go later, but I wonder if adding UNICODE_ENABLE = yes to the rules.mk file of a VIA compatible keymap would allow the use of the UC() key code under ANY in VIA.


Sent from my iPhone using Tapatalk
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Keyboard Macros
« Reply #25 on: Sun, 19 July 2020, 06:59:42 »
I managed to get a hash keycode working with {KC_LALT,KC_P3,KC_P5} as the macro on the keyboard I built for my wife, so I was thinking that the same would work, but apparently not.
Maybe it works then - I've never done anything with macros in QMK or TMK let alone the user friendly website versions which surely have their own quirks.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Keyboard Macros
« Reply #26 on: Sun, 19 July 2020, 07:02:05 »
I managed to get a hash keycode working with {KC_LALT,KC_P3,KC_P5} as the macro on the keyboard I built for my wife, so I was thinking that the same would work, but apparently not.
Maybe it works then - I've never done anything with macros in QMK or TMK let alone the user friendly website versions which surely have their own quirks.
Alas I can confirm that it does not, though I’m not sure why - the above chord words as the Alt code for #, so I’m not sure why the one for £ doesn’t. I can only assume a Alt+## code works differently to an Alt+#### one
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #27 on: Sun, 19 July 2020, 15:11:17 »
Have you got another macro working?  Sounds like you've got the function inside another function...

Only those where it pastes some text, nothing with actual keycode.

Are you putting that macro string into a QMK keymap files and manually compiling, or are you putting them into one of the macro boxes in the VIA configurator? If you’re using VIA when it has a more restricted, but less complex macro system - it will largely do autocomplete for you, but the equivilent macro chord would be something like:

{KC_LALT,KC_KP_0,KC_KP_1,KC_KP_6,KC_KP_3}

I’d I recall correctly (I’m not at my PC)

I'm putting it in VIA macro editor.
Don't know how to make it "read" what to do, not just re-type it...
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: Keyboard Macros
« Reply #28 on: Fri, 08 January 2021, 07:31:25 »
Hey guys!

I'm back with this subject:)
I have a new keyboard that uses QMK and would like to add pound sign to it, for example under one of the keys, Pause for example.

I'm trying to understand this whole QMK thingy - got the configurator page, I see it has my keyboard's profile and layout (IDOBAO ID87).
I've downloaded keymap json file.

Now, how can I simply swap Pause key with pound sign?


9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK programming and keyboard macros
« Reply #29 on: Fri, 08 January 2021, 08:32:36 »
Are you using a UK layout in your OS or a USA one?  If USA you'll need to make the alt code above work, if UK hold shift and press 3.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK programming and keyboard macros
« Reply #30 on: Fri, 08 January 2021, 08:41:52 »
Are you using a UK layout in your OS or a USA one?  If USA you'll need to make the alt code above work, if UK hold shift and press 3.

LOL, I use ANSI US, I would know how to press it in UK  ^-^
I use US keyboard. I also could use US International and then use ALTGr but I hate US Int as I freaking hate when quotes are dead...
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK programming and keyboard macros
« Reply #31 on: Fri, 08 January 2021, 10:24:25 »
No-one said your new keyboard had a 3 key :P (though from the 87 in the name I should have guessed it did...)

Can you enable unicode in whatever helpful configurator you're using? (relevant QMK documentation)

If so 0x00A3 is the code for £.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK programming and keyboard macros
« Reply #32 on: Mon, 11 January 2021, 07:56:01 »
No-one said your new keyboard had a 3 key :P (though from the 87 in the name I should have guessed it did...)

Can you enable unicode in whatever helpful configurator you're using? (relevant QMK documentation)

If so 0x00A3 is the code for £.

Using QMK configurator I managed to get compiled hex file for my keyboard, but cannot download full firmware, getting error every time I try.

Is there a way to edit hex file to add this pound sign code?
I simply would swap it with Pause key.
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK programming and keyboard macros
« Reply #33 on: Thu, 25 March 2021, 07:35:32 »
No-one said your new keyboard had a 3 key :P (though from the 87 in the name I should have guessed it did...)

Can you enable unicode in whatever helpful configurator you're using? (relevant QMK documentation)

If so 0x00A3 is the code for £.

Hey!
I just updated my ID87 keyboard as its now VIA programmable!

Is there a way to use unicode in VIA macro?

9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: QMK programming and keyboard macros
« Reply #34 on: Thu, 25 March 2021, 07:56:22 »
Is there a way to use unicode in VIA macro?

I've never managed to get a pound keycode working in VIA.

By far the easiest way to implement is is not to touch the firmware at all and just use AutoHotKey

Code: [Select]
$::Send, {Asc 0163}
:*:$$::{Asc 0036}

That'll do a £ the first time you hit Shift+4 and then do a $ the second time you hit it. Solves both the pound issue and doesn't introduce the lack-of-a-dollar issue.
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK programming and keyboard macros
« Reply #35 on: Thu, 25 March 2021, 08:55:17 »
Is there a way to use unicode in VIA macro?

I've never managed to get a pound keycode working in VIA.

By far the easiest way to implement is is not to touch the firmware at all and just use AutoHotKey

Code: [Select]
$::Send, {Asc 0163}
:*:$$::{Asc 0036}

That'll do a £ the first time you hit Shift+4 and then do a $ the second time you hit it. Solves both the pound issue and doesn't introduce the lack-of-a-dollar issue.

Yeah, but this requires software installation, cannot just plug my keeb anywhere and have that.
I need to program it so it has it on board.

I... must.. succeed... :)
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #36 on: Wed, 31 March 2021, 05:56:37 »
If there is no way to use VIA and add this pound sign - how can I edit QMK file and add it?
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #37 on: Wed, 31 March 2021, 10:58:47 »
If there is no way to use VIA and add this pound sign - how can I edit QMK file and add it?


enable unicode ... relevant QMK documentation

0x00A3 is the code for £

120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #38 on: Wed, 31 March 2021, 17:44:46 »
If there is no way to use VIA and add this pound sign - how can I edit QMK file and add it?


enable unicode ... relevant QMK documentation

0x00A3 is the code for £

I know I know, I've seen your replies. Its just too hard for me:(

I guess all I can is use autohotkey... :'(
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #39 on: Thu, 01 April 2021, 09:56:55 »
Its just too hard for me :(
Starting to remember why I love EasyAVR so much - this looks so easy but what a mess to setup, and this is without the added hassle of Windows.

The attached hex should type a £ when you hold the menu key (next to right control) and press 3 - does it?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #40 on: Thu, 01 April 2021, 17:45:48 »
Its just too hard for me :(
Starting to remember why I love EasyAVR so much - this looks so easy but what a mess to setup, and this is without the added hassle of Windows.

The attached hex should type a £ when you hold the menu key (next to right control) and press 3 - does it?

No, it types 00a3
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #41 on: Fri, 02 April 2021, 04:25:46 »
You got me curious enough to try this on my GH60, I couldn't even get it to type 00a3.  I then considered macros might be easier (as well as providing examples for you to to do other things) and looked into the OS side and found the way to get a simple £ is different for Mac, Windows and Linux.  Of course it is, they don't want to make this easy!  So I've made macros for Linux and Windows, I don't understand Mac or I'd have done that too.

In the attached hex they are on 3 and 4 while holding menu - do either of them work or are you a Mac guy?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #42 on: Fri, 02 April 2021, 06:16:47 »
You got me curious enough to try this on my GH60, I couldn't even get it to type 00a3.  I then considered macros might be easier (as well as providing examples for you to to do other things) and looked into the OS side and found the way to get a simple £ is different for Mac, Windows and Linux.  Of course it is, they don't want to make this easy!  So I've made macros for Linux and Windows, I don't understand Mac or I'd have done that too.

In the attached hex they are on 3 and 4 while holding menu - do either of them work or are you a Mac guy?

Cool, thanks, I'll try that :)

MAC?! F*ck no!


EDIT: no, sorry, both do nothing. Either 3 or 4 with Fn key.
« Last Edit: Fri, 02 April 2021, 06:20:49 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #43 on: Fri, 02 April 2021, 06:27:28 »
So you're in Windows.  I know the Linux one works...

I'm not going to be defeated by this, will have to find a keyboard tester for Linux and see what it's (not) doing.

Edit:  Aqua keytest runs in wine, the Windows one does what it's supposed to - Right Alt then 0163 on the numberpad.  Do you see that?  Maybe Win10 messed with it.
« Last Edit: Fri, 02 April 2021, 06:33:40 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #44 on: Fri, 02 April 2021, 06:39:44 »
So you're in Windows.  I know the Linux one works...

I'm not going to be defeated by this, will have to find a keyboard tester for Linux and see what it's (not) doing.

Edit:  Aqua keytest runs in wine, the Windows one does what it's supposed to - Right Alt then 0163 on the numberpad.  Do you see that?  Maybe Win10 messed with it.

Yes, I can see on Aqua it does ALT0163


EDIT: AAAAAAAAAAAAAAAAAAAA!!!!!!!!

It works - I had to switch back to US keyboard, from US International.
I can finally go back to NORMAL using of quotes AND have £ symbol! Brilliant!

It works! ITS ALIVE!!!!  :D :D :D :D :thumb:

£££££££££££££££££

THANK YOU!!!
« Last Edit: Fri, 02 April 2021, 06:46:09 by phinix »
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #45 on: Fri, 02 April 2021, 06:50:19 »
OK, read through this thread again and found the 0163 = £ was in AutoHotkey, we're not using that.  The Alt code is 156 so not surprising it doesn't work!

Windows is on 3

Edit: :confused:  Maybe the new one works on International?!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #46 on: Fri, 02 April 2021, 06:59:21 »
OK, read through this thread again and found the 0163 = £ was in AutoHotkey, we're not using that.  The Alt code is 156 so not surprising it doesn't work!

Windows is on 3

Edit: :confused:  Maybe the new one works on International?!

No no, this is ok, I want to use US, not Int. Int was terrible as quotes didn't show up till I actually pressed second character.
So its all good, previous version is fine.
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: QMK - VIA programming and keyboard macros
« Reply #47 on: Fri, 02 April 2021, 07:03:35 »
OK, the top and bottom line are already in the file, paste this over them
Code: [Select]
#include QMK_KEYBOARD_H

enum custom_keycodes {
    UKPOUNDL = SAFE_RANGE,
    UKPOUNDW,
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
   
    case UKPOUNDL:
        if (record->event.pressed) {
            // when keycod is pressed
            SEND_STRING(SS_LSFT(SS_RCTL("ua3")));
        } else {
            // when keycode is released
        }
        break;
       
    case UKPOUNDW:
        if (record->event.pressed) {
            // when keycode is pressed
            SEND_STRING(SS_RALT(SS_TAP(X_P0)SS_TAP(X_P1)SS_TAP(X_P6)SS_TAP(X_P3)));
        } else {
            // when keycode is released
        }
        break;
    } 
    return true;
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

Then use UKPOUNDW in the keymap.

The bit between the SEND_STRINGS(...) might even work in via?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline -Jerry-

  • Posts: 336
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: QMK - VIA programming and keyboard macros
« Reply #48 on: Fri, 02 April 2021, 07:09:48 »
OK, read through this thread again and found the 0163 = £ was in AutoHotkey, we're not using that.  The Alt code is 156 so not surprising it doesn't work!

Windows is on 3

Edit: :confused:  Maybe the new one works on International?!

It should be both, theoretically, as per: https://altcodeunicode.com/pound-sign-alt-code/

The windows alt codes for £ are ALT 156 or ALT 0163 - I've got AHK using 0163 without issue, but perhaps QMK only likes the three digit codes.
"Romeo"     "Split75"   "Melody96"     "KBD8X MKII"     "Womier K87"

Offline phinix

  • Thread Starter
  • Posts: 2297
  • Location: Haggis Land
  • On a diet.. again.. don't ask...
Re: QMK - VIA programming and keyboard macros
« Reply #49 on: Fri, 02 April 2021, 07:11:01 »
OK, the top and bottom line are already in the file, paste this over them
Code: [Select]
#include QMK_KEYBOARD_H

enum custom_keycodes {
    UKPOUNDL = SAFE_RANGE,
    UKPOUNDW,
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
   
    case UKPOUNDL:
        if (record->event.pressed) {
            // when keycod is pressed
            SEND_STRING(SS_LSFT(SS_RCTL("ua3")));
        } else {
            // when keycode is released
        }
        break;
       
    case UKPOUNDW:
        if (record->event.pressed) {
            // when keycode is pressed
            SEND_STRING(SS_RALT(SS_TAP(X_P0)SS_TAP(X_P1)SS_TAP(X_P6)SS_TAP(X_P3)));
        } else {
            // when keycode is released
        }
        break;
    } 
    return true;
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

Then use UKPOUNDW in the keymap.

The bit between the SEND_STRINGS(...) might even work in via?
Where, in hex file?
How do I edit it?
9100 | 3070 | 8TB SSD + 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | Ruark Audio MR1 Mark II | LG OLED 48CX
Realforce 87u55 | CM QuickFire Rapid MX Blacks | NCR-80 87g Gateron Oil Kings | Logitech Pro Superlight
SA: Retro Petscii, 7bit Round6 'Symbiosis', Filco, Carbon Bone Cherry: GMK Laser, OG double shot caps, CRP APL GSA: Retro High-light HSA: Hyperfuse

::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::