From 678544914a372750ce40baa901b0b3a04337372e Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Wed, 10 May 2023 16:39:51 -0700 Subject: [PATCH] move keyboard hotkey macros to website docs (#5002) --- .../usage/guides/keyboard-hotkey-macros.md | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) rename KEYBOARD_HOTKEY_MACROS.md => website/content/terminal/usage/guides/keyboard-hotkey-macros.md (74%) diff --git a/KEYBOARD_HOTKEY_MACROS.md b/website/content/terminal/usage/guides/keyboard-hotkey-macros.md similarity index 74% rename from KEYBOARD_HOTKEY_MACROS.md rename to website/content/terminal/usage/guides/keyboard-hotkey-macros.md index b863effaa2d..07716929df0 100644 --- a/KEYBOARD_HOTKEY_MACROS.md +++ b/website/content/terminal/usage/guides/keyboard-hotkey-macros.md @@ -1,4 +1,23 @@ -# Keyboard Hotkey Macros +--- +title: Keyboard Hotkey Macros +sidebar_position: 6 +description: Create keyboard hotkey macros to run a sequence of commands +keywords: + [ + keyboard, + macros, + commands, + pipeline, + excel, + customizable, + hotkey, + remap, + ] +--- + +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; + + This document will explain how you can set hotkeys macros on your customizable keyboard which allow you to perform investment research in a few seconds. @@ -14,13 +33,13 @@ One of the concepts that OpenBB introduced early on was the concept of script ro E.g. by running `exe script.openbb` the following sequence could be executed -```shell +```console stocks/load AAPL/candle --ma 20/fa/epsfc/pt/est ``` which would lead to: -![image](https://user-images.githubusercontent.com/25267873/236659876-e119c820-b9ed-40e7-bb8d-5510fe862149.png) +image This allows to automate the process of investment research, and can improve user's experience by a significant margin. @@ -41,29 +60,29 @@ For the purpose of this example, the command pipeline we are creating has the fo 1. Try VIA [here](https://usevia.app/). The following screen should popup - Screenshot 2023-05-06 at 11 10 51 PM +![VIA](https://user-images.githubusercontent.com/25267873/236660856-f92ac602-cde9-48e6-8029-c083fbb75ff9.png) 2. Select the Layer you are interested in altering. As we're not looking forward to remap any of the existing main keys, we need to go to layer 2, 3 or 4. In my case, with a Keychron Q2, I know that Layer 4 can be accessed by pressing on "Fn2". Thus, I select that layer. - Screenshot 2023-05-06 at 11 10 06 PM +![Layer](https://user-images.githubusercontent.com/25267873/236660841-09203874-8a8e-4393-8674-357aad67a22b.png) 3. Most keys should have a triangle upside down which simbolizes that they don't have any functionality. You want to select one of those keys to contain your hotkey routine. After that selection you want to remap the key functionality, hence in the **KEYMAP settings** below you click on MACROS tab and select "MO". Now the screen should look like this: - Screenshot 2023-05-06 at 11 13 43 PM +![Layer](https://user-images.githubusercontent.com/25267873/236660948-a148582e-f928-4f12-ae54-9bdd3adfd020.png) 4. Now we want to change what "MO" does and for that we select the **MACROS settings** below. Then we can select "M0" and insert `dps/psi/../fa/pt/income/..{KC_ENT}`. The screen should look like this: - Screenshot 2023-05-06 at 11 17 52 PM +![Macro](https://user-images.githubusercontent.com/25267873/236661126-eeb5dc7c-2c01-4a43-ab64-12c470e864ce.png) - Note that the `{KC_ENT}` will ensure that the command is run on the terminal. +Note that the `{KC_ENT}` will ensure that the command is run on the terminal. 5. Save. To ensure that everything is correct you can go into the **KEYMAP settings** and click on the hotkey that you just created to see if it contains the sequence of commands, the following sequence should appear: - Screenshot 2023-05-06 at 11 20 24 PM +![Save](https://user-images.githubusercontent.com/25267873/236661232-4f9119de-af37-49a2-948d-cfd6d650ed92.png) 6. Finally, we are ready to test it on the [OpenBB Terminal](https://my.openbb.co/app/terminal). After going into `stocks` and doing `load AAPL`, I pressed "Fn2'+Z which lead to: - Screenshot 2023-05-06 at 10 53 49 PM +![Test](https://user-images.githubusercontent.com/25267873/236660272-290fe586-7663-4cd6-bfc0-80b7f8f2efd1.png) PS: If you prefer to see this in video format, you can do so by checking the following video.