Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (46 commits)
  [Docs] Update Japanese translation of i2c_driver.md (qmk#8523)
  [Docs] Japanese translation of hardware_*.md (qmk#8278)
  Add Slovak keymap and sendstring LUT (qmk#8561)
  Add Serbian keymaps and sendstring LUT (qmk#8560)
  Add Lithuanian keymap and sendstring LUT (qmk#8562)
  Add Latvian keymap and sendstring LUT (qmk#8563)
  [Keymap] Drashna's Cleanup and RGB Divide (qmk#8506)
  Update Quefrency (qmk#8623)
  [Keymap] Add support for the Launch Pad in VIA (qmk#8615)
  [Keyboard] added bear_face PCB (qmk#8596)
  [Keymap] Keymap refactoring in Treadstone48 (qmk#8574)
  Update newbs_getting_started.md
  [Keymap] Sigul planck (qmk#8546)
  Disable console on vusb boards using mouse/extra (qmk#8625)
  Rename UC_OSX (and related constants) to UC_MAC (qmk#8589)
  V-USB: Consolidate usbconfig.h's into a single file (qmk#8584)
  Add Japanese translation of cli_commands.md (qmk#8513)
  [Docs] Update Japanese translation of cli.md (qmk#8510)
  [Docs] Update Japanese translation of faq related documents (qmk#8521)
  Update Japanese translation of config_options.md
  ...
  • Loading branch information
Shinichi-Ohki committed Apr 1, 2020
2 parents d0763d5 + 1962135 commit cb9b979
Show file tree
Hide file tree
Showing 251 changed files with 6,816 additions and 20,487 deletions.
12 changes: 0 additions & 12 deletions bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"""CLI wrapper for running QMK commands.
"""
import os
import subprocess
import sys
from importlib.util import find_spec
from time import strftime

# Add the QMK python libs to our path
script_dir = os.path.dirname(os.path.realpath(__file__))
Expand Down Expand Up @@ -35,16 +33,6 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
exit(255)

# Figure out our version
# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows.
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

if result.returncode == 0:
os.environ['QMK_VERSION'] = result.stdout.strip()
else:
os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty'

# Setup the CLI
import milc # noqa

Expand Down
16 changes: 9 additions & 7 deletions docs/feature_unicode.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort

The following input modes are available:

* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).

To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode.
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode.

!> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.

!> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in a future version of QMK.

* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).

Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
Expand Down Expand Up @@ -124,7 +126,7 @@ You can switch the input mode at any time by using one of the following keycodes
|----------------------|---------|------------|--------------------------------------------------------------|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to macOS input |
|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input |
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
Expand All @@ -145,9 +147,9 @@ If you have the [Audio feature](feature_audio.md) enabled on the board, you can
For instance, you can add these definitions to your `config.h` file:
```c
#define UNICODE_SONG_OSX COIN_SOUND
#define UNICODE_SONG_MAC AUDIO_ON_SOUND
#define UNICODE_SONG_LNX UNICODE_LINUX
#define UNICODE_SONG_BSD MARIO_GAMEOVER
#define UNICODE_SONG_BSD TERMINAL_SOUND
#define UNICODE_SONG_WIN UNICODE_WINDOWS
#define UNICODE_SONG_WINC UNICODE_WINDOWS
```
Expand All @@ -171,7 +173,7 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi

|Define |Type |Default |Example |
|------------------|----------|------------------|-------------------------------------------|
|`UNICODE_KEY_OSX` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_OSX KC_RALT` |
|`UNICODE_KEY_MAC` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_MAC KC_RALT` |
|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |

Expand All @@ -180,7 +182,7 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi
You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.

```c
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_WINC
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WIN, UC_WINC
```
You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
Expand Down
66 changes: 66 additions & 0 deletions docs/hardware_keyboard_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,76 @@ This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains

All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work.

The `config.h` files can also be placed in sub-folders, and the order in which they are read is as follows:

* `keyboards/top_folder/config.h`
* `keyboards/top_folder/sub_1/config.h`
* `keyboards/top_folder/sub_1/sub_2/config.h`
* `keyboards/top_folder/sub_1/sub_2/sub_3/config.h`
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/config.h`
* `users/a_user_folder/config.h`
* `keyboards/top_folder/keymaps/a_keymap/config.h`
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_config.h`
* `keyboards/top_folder/sub_1/sub_2/sub_3/post_config.h`
* `keyboards/top_folder/sub_1/sub_2/post_config.h`
* `keyboards/top_folder/sub_1/post_config.h`
* `keyboards/top_folder/post_config.h`

The `post_config.h` file can be used for additional post-processing, depending on what is specified in the `config.h` file. For example, if you define the `IOS_DEVICE_ENABLE` macro in your keymap-level `config.h` file as follows, you can configure more detailed settings accordingly in the `post_config.h` file:

* `keyboards/top_folder/keymaps/a_keymap/config.h`
```c
#define IOS_DEVICE_ENABLE
```
* `keyboards/top_folder/post_config.h`
```c
#ifndef IOS_DEVICE_ENABLE
// USB_MAX_POWER_CONSUMPTION value for this keyboard
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif

#ifdef RGBLIGHT_ENABLE
#ifndef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_VAL_STEP 17
#else
#define RGBLIGHT_LIMIT_VAL 35
#define RGBLIGHT_VAL_STEP 4
#endif
#ifndef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 10
#endif
#ifndef RGBLIGHT_SAT_STEP
#define RGBLIGHT_SAT_STEP 17
#endif
#endif
```

?> If you define options using `post_config.h` as in the above example, you should not define the same options in the keyboard- or user-level `config.h`.

### `rules.mk`

The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.

The `rules.mk` file can also be placed in a sub-folder, and its reading order is as follows:

* `keyboards/top_folder/rules.mk`
* `keyboards/top_folder/sub_1/rules.mk`
* `keyboards/top_folder/sub_1/sub_2/rules.mk`
* `keyboards/top_folder/sub_1/sub_2/sub_3/rules.mk`
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk`
* `keyboards/top_folder/keymaps/a_keymap/rules.mk`
* `users/a_user_folder/rules.mk`
* `common_features.mk`

Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options.

?> See `build_keyboard.mk` and `common_features.mk` for more details.

### `<keyboard_name.c>`

This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.
Expand Down
Loading

0 comments on commit cb9b979

Please sign in to comment.