Open eatondpe opened 3 years ago
Nice work @eatondpe.
I have been trying to find documentation of the roam42 keyboardlib and even had a look at source code. I couldn't find it.
Can you point me in the right direction? Cheers!
@mlava I wish I could. I still have not found any such documentation. I just found what I needed in someone else's code.
@roamhacker Do you know where we can find documentation on the keyboardlib you use?
@mlava Or I should say, I saw an example of including shiftKey=true
and guessed that ctrlKey
must also exist. The rest was just experimentation.
If you search the whole roam42 code base you will see examples of its use. It is basically using some standard JS stuff for key events. It can't emulate everything in every scenario. So you have to test thoroughly. But it can emulate letters, numbers and combinations of holding CTRL, SHIFT, ALT
Also useful is the mouse click commands in 42. you can simulate left and right mouse clicks.
Thanks @eatondpe and @roamhacker
I will search the code. Cheers!
✂️ Copy of your #42SmartBlock from Roam
📋 Describe the SmartBlock
This SmartBlock opens the current block in the sidebar by simulating a
CTRL+SHIFT+O
keyboard entry. This could be useful in workflows in which a certain block is desired to be pinned.✅ Describe any prerequisites or dependencies that are required for this SmartBlock
None.
📷 Screenshot of your #42SmartBlock workflow/template from Roam
💡 Additional Info