Author Topic: QMK programming and keyboard macros  (Read 2926 times)

0 Members and 1 Guest are viewing this topic.

Offline phinix

  • Thread Starter
  • Posts: 1240
  • Location: Haggis Land
  • RIP typo...
QMK 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: Fri, 08 January 2021, 07:33:17 by phinix »
9100 | 3070 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline 4sStylZ

  • Posts: 120
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 .
Bpo 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: 885
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline phinix

  • Thread Starter
  • Posts: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline -Jerry-

  • Posts: 283
  • 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 youre 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}

Id I recall correctly (Im not at my PC)
« Last Edit: Sun, 19 July 2020, 05:41:55 by -Jerry- »
     
     Hub16           HS60 + Tofu                  Melody96

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 283
  • 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.
     
     Hub16           HS60 + Tofu                  Melody96

Offline -Jerry-

  • Posts: 283
  • Location: Bath, UK
  • OR '1'='1'
    • Jerry Talks Tech
Re: Keyboard Macros
« Reply #24 on: Sun, 19 July 2020, 06:52:02 »
Ive never tried it, so Ill 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
     
     Hub16           HS60 + Tofu                  Melody96

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 283
  • 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 Im not sure why - the above chord words as the Alt code for #, so Im not sure why the one for doesnt. I can only assume a Alt+## code works differently to an Alt+#### one
     
     Hub16           HS60 + Tofu                  Melody96

Offline phinix

  • Thread Starter
  • Posts: 1240
  • Location: Haggis Land
  • RIP typo...
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 youre 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}

Id I recall correctly (Im 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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline phinix

  • Thread Starter
  • Posts: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4039
  • 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: 1240
  • Location: Haggis Land
  • RIP typo...
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 | 2x 1TB SSD | Z390 Aorus Pro ITX | 16GB RAM | SFX 600W | Sentry 2.0 | LG OLED 48 CX
Realforce R2 55g Novatouched+Deskeys #3 | CM QuickFire Rapid Frosty Flake MX Blacks | IDOBAO ID87 w/ Glorious Holy Pandas| Model M | Razer Pro Click | X52 PRO
SA: Carbon, Penumbra, 7bit's Round6, Amber Screen Cherry: OG caps XDA: Canvas MDA: Big Bone MT3: Serika

 ::: Phinix Cube ::: Phinix Nano Tower ::: Phinix Aurora ::: Phinix Chimera ::: Phinix Retro :::
star citizen :::  CMDR Phinix 325A LTI