Skip to content

Commit

Permalink
remove qmk console, which is now part of the global cli (qmk#14206)
Browse files Browse the repository at this point in the history
  • Loading branch information
coquizen committed Jun 3, 2022
1 parent 7e49a03 commit 1546418
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 92 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/* Copyright 2021 Kyle McCreery
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H

// Defines names for use in layer keycodes and the keymap

enum layer_names {
_BASE,
_FN1,
_FN2,
_FN3
};


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_MUTE, KC_P4, KC_P5, KC_P6, _______,
MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT,
KC_BSPC, KC_P0, _______, KC_PDOT, _______,

KC_F5, KC_F6, KC_F7

),
[_FN1] = LAYOUT(
_______, _______, _______, _______,
_______, _______, _______, _______,
RGB_HUD, RGB_SPI, RGB_HUI, _______,
_______, RGB_RMOD, RGB_TOG, RGB_MOD, _______,
_______, RGB_VAD, RGB_SPD, RGB_VAI, _______,
_______, RGB_SAD, _______, RGB_SAI, _______,

_______, _______, _______

),
[_FN2] = LAYOUT(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,

_______, _______, _______

),
[_FN3] = LAYOUT(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,

_______, _______, _______

)
};

#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
case 1:
if (clockwise) {
tap_code(KC_BRIU);
} else {
tap_code(KC_BRID);
}
break;
}
return true;
}
#endif

#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_270; // flips the display 270 degrees
}

static void render_logo(void) { // Render MechWild "MW" Logo
static const char PROGMEM logo_1[] = {0x8A, 0x8B, 0x8C, 0x8D, 0x00};
static const char PROGMEM logo_2[] = {0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0x00};
static const char PROGMEM logo_3[] = {0xCA, 0xCB, 0xCC, 0xCD, 0x00};
static const char PROGMEM logo_4[] = {0x20, 0x8E, 0x8F, 0x90, 0x00};
oled_set_cursor(0,0);
oled_write_P(logo_1, false);
oled_set_cursor(0,1);
oled_write_P(logo_2, false);
oled_set_cursor(0,2);
oled_write_P(logo_3, false);
oled_set_cursor(0,3);
oled_write_P(logo_4, false);
}

void oled_task_user(void) {
render_logo();
oled_set_cursor(0,6);

oled_write_ln_P(PSTR("Layer"), false);

switch (get_highest_layer(layer_state)) {
case _BASE:
oled_write_ln_P(PSTR("Base"), false);
break;
case _FN1:
oled_write_ln_P(PSTR("FN 1"), false);
break;
case _FN2:
oled_write_ln_P(PSTR("FN 2"), false);
break;
case _FN3:
oled_write_ln_P(PSTR("FN 3"), false);
break;
default:
oled_write_ln_P(PSTR("Undef"), false);
}
oled_write_ln_P(PSTR(""), false);
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
#endif
Binary file not shown.
93 changes: 1 addition & 92 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,68 +118,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
```

## `qmk cd`

This command opens a new shell in your `qmk_firmware` directory.

Note that if you are already somewhere within `QMK_HOME` (for example, the `keyboards/` folder), nothing will happen.

To exit out into the parent shell, simply type `exit`.

**Usage**:

```
qmk cd
```

## `qmk console`

This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`.

**Usage**:

```
qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>]
```

**Examples**:

Connect to all available keyboards and show their console messages:

```
qmk console
```

List all devices:

```
qmk console -l
```

Show only messages from clueboard/66/rev3 keyboards:

```
qmk console -d C1ED:2370
```

Show only messages from the second clueboard/66/rev3:

```
qmk console -d C1ED:2370:2
```

Show timestamps and VID:PID instead of names:

```
qmk console -n -t
```

Disable bootloader messages:

```
qmk console --no-bootloaders
```

## `qmk doctor`

This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
Expand Down Expand Up @@ -399,40 +337,11 @@ qmk format-c
qmk format-c -b branch_name
```

## `qmk generate-compilation-database`

**Usage**:

```
qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
```

Creates a `compile_commands.json` file.

Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you.

This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files.

**Example:**

```
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
$ qmk generate-compilation-database
Ψ Making clean
Ψ Gathering build instructions from make -n gh60/satan:colemak
Ψ Found 50 compile commands
Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
```

Now open your dev environment and live a squiggly-free life.

## `qmk docs`

This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
Use the `-b`/`--browser` flag to automatically open the local webserver in your default browser.

This command runs `docsify serve` if `docsify-cli` is installed (which provides live reload), otherwise Python's builtin HTTP server module will be used.

**Usage**:

```
Expand Down Expand Up @@ -498,7 +407,7 @@ This command runs the python test suite. If you make changes to python code you
**Usage**:

```
qmk pytest [-t TEST]
qmk pytest
```

**Examples**:
Expand Down
Loading

0 comments on commit 1546418

Please sign in to comment.