diff options
121 files changed, 4128 insertions, 774 deletions
diff --git a/docs/ja/feature_advanced_keycodes.md b/docs/ja/feature_advanced_keycodes.md new file mode 100644 index 0000000000..d208d7f926 --- /dev/null +++ b/docs/ja/feature_advanced_keycodes.md @@ -0,0 +1,85 @@ +# レイヤーの切り替えとトグル :id=switching-and-toggling-layers + +<!--- + original document: 5d5ff80:docs/feature_advanced_keycodes.md + git diff 5d5ff80 HEAD -- docs/feature_advanced_keycodes.md | cat +--> + +これらの機能により、様々な方法でレイヤーをアクティブ化することができます。レイヤーは一般的に独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブ化することができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーに渡すことが一般的です。レイヤーの詳細については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を見てください。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。 + +* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。) +* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。 +* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。 +* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。 +* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。 +* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。 +* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。 +* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。 + +## 注意事項 + +現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。レイヤータップあるいはモッドタップのキーコードの一部として指定されたモディファイアは無視されます。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。 + +さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。 + +# レイヤーの使用 + +レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。 + +## 初心者 + +QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください: + +* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。 +* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。 +* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。 + +## 中級ユーザ + +複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。 + +## 上級ユーザ + +レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。 + +レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。 + +場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。 + +# 修飾キー :id=modifier-keys + +以下のようにキーコードとモディファイアを組み合わせることができます。押すと、モディファイアのキーダウンイベントが送信され、次に `kc` のキーダウンイベントが送信されます。放すと、`kc` のキーアップイベントが送信され、次にモディファイアのキーアップイベントが送信されます。 + +| キー | エイリアス | 説明 | +|----------|-------------------------------|----------------------------------------------------| +| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 | +| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 | +| `LALT(kc)` | `A(kc)` | 左 Alt を押しながら `kc`を押します。 | +| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 | +| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 | +| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 | +| `RALT(kc)` | `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 | +| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 | +| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 | +| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 | +| `LCAG(kc)` | | 左 Control、左 Alt、左 GUI を押しながら `kc` を押します。 | +| `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 | +| `HYPR(kc)` | | 左 Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 | + +また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。 + +# 過去の内容 + +このページには多くの機能が含まれていました。このページを構成していた多くのセクションをそれぞれのページに移動しました。これより下は全て単なるリダイレクトであるため、web上で古いリンクをたどっている人は探しているものを見つけることができます。 + +## モッドタップ :id=mod-tap + +* [モッドタップ](ja/mod_tap.md) + +## ワンショットキー :id=one-shot-keys + +* [ワンショットキー](ja/one_shot_keys.md) + +## タップホールド設定オプション :id=tap-hold-configuration-options + +* [タップホールド設定オプション](ja/tap_hold.md) diff --git a/docs/ja/feature_audio.md b/docs/ja/feature_audio.md new file mode 100644 index 0000000000..0f845161eb --- /dev/null +++ b/docs/ja/feature_audio.md @@ -0,0 +1,328 @@ +# オーディオ + +<!--- + original document: 5d5ff80:docs/feature_audio.md + git diff 5d5ff80 HEAD -- docs/feature_audio.md | cat +--> + +キーボードは音を出すことができます!Planck、Preonic あるいは特定の PWM 対応ピンにアクセスできる AVR キーボードがある場合は、単純なスピーカーを接続してビープ音を鳴らすことができます。これらのビープ音を使ってレイヤーの変化、モディファイア、特殊キーを示したり、あるいは単にイカした8ビットの曲を鳴らすことができます。 + +最大2つの同時オーディオ音声がサポートされ、1つはタイマー1によってもう一つはタイマー3によって駆動されます。以下のピンは config.h の中でオーディオ出力として定義することができます: + +Timer 1: +`#define B5_AUDIO` +`#define B6_AUDIO` +`#define B7_AUDIO` + +Timer 3: +`#define C4_AUDIO` +`#define C5_AUDIO` +`#define C6_AUDIO` + +`rules.mk` に `AUDIO_ENABLE = yes` を追加すると、他の設定無しで自動的に有効になる幾つかの異なるサウンドがあります: + +``` +STARTUP_SONG // キーボードの起動時に再生 (audio.c) +GOODBYE_SONG // RESET キーを押すと再生 (quantum.c) +AG_NORM_SONG // AG_NORM キーを押すと再生 (quantum.c) +AG_SWAP_SONG // AG_SWAP キーを押すと再生 (quantum.c) +CG_NORM_SONG // CG_NORM キーを押すと再生 (quantum.c) +CG_SWAP_SONG // CG_SWAP キーを押すと再生 (quantum.c) +MUSIC_ON_SONG // 音楽モードがアクティブになると再生 (process_music.c) +MUSIC_OFF_SONG // 音楽モードが非アクティブになると再生 (process_music.c) +CHROMATIC_SONG // 半音階音楽モードが選択された時に再生 (process_music.c) +GUITAR_SONG // ギター音楽モードが選択された時に再生 (process_music.c) +VIOLIN_SONG // バイオリン音楽モードが選択された時に再生 (process_music.c) +MAJOR_SONG // メジャー音楽モードが選択された時に再生 (process_music.c) +``` + +`config.h` の中で以下のような操作を行うことで、デフォルトの曲を上書きすることができます: + +```c +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +``` + +サウンドの完全なリストは、[quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) で見つかります - このリストに自由に追加してください!利用可能な音は [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h) で見つかります。 + +特定の時にカスタムサウンドを再生するために、以下のように曲を定義することができます(ファイルの上部付近に): + +```c +float my_song[][2] = SONG(QWERTY_SOUND); +``` + +以下のように曲を再生します: + +```c +PLAY_SONG(my_song); +``` + +または、以下のようにループで再生することができます: + +```c +PLAY_LOOP(my_song); +``` + +オーディオがキーボードに組み込まれていない時に問題が起きる事を避けるために、`#ifdef AUDIO_ENABLE` / `#endif` で全てのオーディオ機能をくるむことをお勧めします。 + +オーディオで利用可能なキーコードは以下の通りです: + +* `AU_ON` - オーディオ機能をオン +* `AU_OFF` - オーディオ機能をオフ +* `AU_TOG` - オーディオ機能を切り替え + +!> これらのキーコードは全てのオーディオ機能をオンおよびオフにします。オフにするとオーディオフィードバック、オーディオクリック、音楽モードなどが完全に無効になります。 + +## ARM オーディオボリューム + +ARM デバイスの場合、DAC サンプル値を調整できます。キーボードがあなたやあなたの同僚にとって騒々しい場合、`config.h` 内の `DAC_SAMPLE_MAX` を使って最大量を設定することができます: + +```c +#define DAC_SAMPLE_MAX 65535U +``` + +## 音楽モード + +音楽モードは列を半音階に、行をオクターブにマップします。これは格子配列キーボードで最適に動作しますが、他のものでも動作させることができます。`0xFF` 未満の全てのキーコードはブロックされるため、音の演奏中は入力できません - 特別なキー/mod があればそれらは引き続き動作します。これを回避するには、音楽モードを有効にする前(あるいは後)で、KC_NO を使って別のレイヤーにジャンプします。 + +メモリの問題により、録音は実験的です - 奇妙な動作が発生した場合は、キーボードの取り外しと再接続で問題が解決するでしょう。 + +利用可能なキーコード: + +* `MU_ON` - 音楽モードをオン +* `MU_OFF` - 音楽モードをオフ +* `MU_TOG` - 音楽モードの切り替え +* `MU_MOD` - 音楽モードの循環 + * `CHROMATIC_MODE` - 半音階。行はオクターブを変更します + * `GUITAR_MODE` - 半音階、ただし行は弦を変更します (+5 階) + * `VIOLIN_MODE` - 半音階。ただし行は弦を変換します (+7 階) + * `MAJOR_MODE` - メージャースケール + +音楽モードでは、以下のキーコードは動作が異なり、通過しません: + +* `LCTL` - 録音を開始 +* `LALT` - 録音を停止/演奏を停止 +* `LGUI` - 録音を再生 +* `KC_UP` - 再生をスピードアップ +* `KC_DOWN` - 再生をスローダウン + +ピッチ標準 (`PITCH_STANDARD_A`) はデフォルトで 440.0f です - これを変更するには、`config.h` に以下のようなものを追加します: + + #define PITCH_STANDARD_A 432.0f + +音楽モードも完全に無効にすることができます。コントローラの容量が足りなくて困っている場合に役に立ちます。無効にするには、これを `config.h` に追加します: + + #define NO_MUSIC_MODE + +### 音楽マスク + +デフォルトで、`MUSIC_MASK` は `keycode < 0xFF` に設定されます。これは、`0xFF` 未満のキーコードが音に変換され、何も出力しないことを意味します。`config.h` の中で以下のものを定義することで、これを変更することができます: + + #define MUSIC_MASK keycode != KC_NO + +これは全てのキーコードを捕捉します - これは、キーボードを再起動するまで、音楽モードで動けなくなることに注意してください! + +どのキーコードを引き続き処理するかを制御する、より高度な方法については、`<keyboard>.c` の中の `music_mask_kb(keycode)` および `keymap.c` の中の `music_mask_user(keycode)` を使うことができます: + + bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } + } + +false を返すものはマスクの一部では無く、常に処理されます。 + +### 音楽マップ + +デフォルトでは、音楽モードはキーのスケールを決定するために列と行を使います。キーボードレイアウトに一致する長方形のマトリックスを使うキーボードの場合、これで十分です。しかし、(Planck Rev6 あるいは多くの分割キーボードなどのように)より複雑なマトリックスを使うキーボードの場合、非常に歪んだ感じを受けることになります。 + +しかしながら、音楽マップオプションにより、音楽モードのためにスケーリングを再マップすることができるため、レイアウトに一致し、より自然になります。 + +この機能を使うには、`#define MUSIC_MAP` を `config.h` ファイルに追加します。そして、`キーボードの名前.c` または `keymap.c` に `uint8_t music_map` を追加します。 + +```c +const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12( + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 +); +``` + +キーボードが使用する `LAYOUT` マクロも使用したいでしょう。これは正しいキーの位置にマップします。キーボードレイアウトの左下から開始し、右に移動してさらに上に移動します。完全なマトリックスができるまで、全てのエントリを入力します。 + +これを実装する方法の例として、[Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) を見ることができます。 + +## オーディオクリック + +これは、ボタンを押すたびにクリック音を追加し、キーボードからのクリック音をシミュレートします。キーを押すたびにわずかに音が異なるため、すばやく入力しても長い単一の音のようには聞こえません。 + +* `CK_TOGG` - ステータスを切り替えます (有効にされた場合、音を再生します) +* `CK_ON` - オーディオクリックをオンにします (音を再生します) +* `CK_OFF` - オーディオクリックをオフにします (音を再生しません) +* `CK_RST` - 周波数をデフォルトの状態に再設定します (デフォルトの周波数で音を再生します) +* `CK_UP` - クリック音の周波数を増やします (新しい周波数で音を再生します) +* `CK_DOWN` - クリック音の周波数を減らします (新しい周波数で音を再生します) + + +容量を節約するためにデフォルトではこの機能は無効です。有効にするには、`config.h` に以下を追加します: + + #define AUDIO_CLICKY + + +これらの値を定義することで、デフォルト、最小および最大周波数、ステッピングおよび組み込みのランダム性を設定することができます: + +| オプション | デフォルト値 | 説明 | +|--------|---------------|-------------| +| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | クリック音のデフォルト/開始音の周波数を設定します。 | +| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | 最小周波数を設定します (60f 未満は少しバグがあります)。 | +| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | 最大周波数を設定します。高すぎると同僚があなたを攻撃する可能性があります。 | +| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f | UP/DOWN キーコードのステップを設定します。これは掛け算の係数です。デフォルトでは、音楽のマイナーの1/3ずつ、周波数を上げ/下げします。 | +| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | クリックのランダム性の係数を設定します。これを `0f` に設定すると各クリックが同一になり、`1.0f` に設定するとこの音は90年代のコンピュータ画面のスクロール/タイピングの効果があります。 | +| `AUDIO_CLICKY_DELAY_DURATION` | 1 | 1がテンポの 1/16、または64分音符である整数音符の長さ (実装の詳細については、`quantum/audio/musical_notes.h` を見てください)。メインのクリック効果は、この時間だけ遅れます。これらを6-12前後の値に調整すると、うるさいスイッチの補正に役立ちます。 | + + + + +## MIDI 機能 + +これはまだ WIP ですが、何が起きているかを見るために、`quantum/process_keycode/process_midi.c` を調べてください。Makefile から有効にします。 + + +## オーディオキーコード + +| キー | エイリアス | 説明 | +|----------------|---------|----------------------------------| +| `AU_ON` | | オーディオモードオン | +| `AU_OFF` | | オーディオモードオフ | +| `AU_TOG` | | オーディオモードを切り替えます | +| `CLICKY_TOGGLE` | `CK_TOGG` | オーディオクリックモードを切り替えます | +| `CLICKY_UP` | `CK_UP` | クリック音の周波数を増やします | +| `CLICKY_DOWN` | `CK_DOWN` | クリック音の周波数を減らします | +| `CLICKY_RESET` | `CK_RST` | 周波数をデフォルトに再設定します | +| `MU_ON` | | 音楽モードをオンにします | +| `MU_OFF` | | 音楽モードをオフにします | +| `MU_TOG` | | 音楽モードを切り替えます | +| `MU_MOD` | | 音楽モードを循環します | + +<!-- FIXME: this formatting needs work + +## Audio + +```c +#ifdef AUDIO_ENABLE + AU_ON, + AU_OFF, + AU_TOG, + + #ifdef FAUXCLICKY_ENABLE + FC_ON, + FC_OFF, + FC_TOG, + #endif + + // Music mode on/off/toggle + MU_ON, + MU_OFF, + MU_TOG, + + // Music voice iterate + MUV_IN, + MUV_DE, +#endif +``` + +### Midi + +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) + MI_ON, // send midi notes when music mode is enabled + MI_OFF, // don't send midi notes when music mode is enabled +#endif + +MIDI_TONE_MIN, +MIDI_TONE_MAX + +MI_C = MIDI_TONE_MIN, +MI_Cs, +MI_Db = MI_Cs, +MI_D, +MI_Ds, +MI_Eb = MI_Ds, +MI_E, +MI_F, +MI_Fs, +MI_Gb = MI_Fs, +MI_G, +MI_Gs, +MI_Ab = MI_Gs, +MI_A, +MI_As, +MI_Bb = MI_As, +MI_B, + +MIDI_TONE_KEYCODE_OCTAVES > 1 + +where x = 1-5: +MI_C_x, +MI_Cs_x, +MI_Db_x = MI_Cs_x, +MI_D_x, +MI_Ds_x, +MI_Eb_x = MI_Ds_x, +MI_E_x, +MI_F_x, +MI_Fs_x, +MI_Gb_x = MI_Fs_x, +MI_G_x, +MI_Gs_x, +MI_Ab_x = MI_Gs_x, +MI_A_x, +MI_As_x, +MI_Bb_x = MI_As_x, +MI_B_x, + +MI_OCT_Nx 1-2 +MI_OCT_x 0-7 +MIDI_OCTAVE_MIN = MI_OCT_N2, +MIDI_OCTAVE_MAX = MI_OCT_7, +MI_OCTD, // octave down +MI_OCTU, // octave up + +MI_TRNS_Nx 1-6 +MI_TRNS_x 0-6 +MIDI_TRANSPOSE_MIN = MI_TRNS_N6, +MIDI_TRANSPOSE_MAX = MI_TRNS_6, +MI_TRNSD, // transpose down +MI_TRNSU, // transpose up + +MI_VEL_x 1-10 +MIDI_VELOCITY_MIN = MI_VEL_1, +MIDI_VELOCITY_MAX = MI_VEL_9, +MI_VELD, // velocity down +MI_VELU, // velocity up + +MI_CHx 1-16 +MIDI_CHANNEL_MIN = MI_CH1 +MIDI_CHANNEL_MAX = MI_CH16, +MI_CHD, // previous channel +MI_CHU, // next channel + +MI_ALLOFF, // all notes off + +MI_SUS, // sustain +MI_PORT, // portamento +MI_SOST, // sostenuto +MI_SOFT, // soft pedal +MI_LEG, // legato + +MI_MOD, // modulation +MI_MODSD, // decrease modulation speed +MI_MODSU, // increase modulation speed +#endif // MIDI_ADVANCED + +--> diff --git a/docs/ja/feature_auto_shift.md b/docs/ja/feature_auto_shift.md new file mode 100644 index 0000000000..c230f93815 --- /dev/null +++ b/docs/ja/feature_auto_shift.md @@ -0,0 +1,135 @@ +# 自動シフト: なぜシフトキーが必要ですか? + +<!--- + original document: 5d5ff80:docs/feature_auto_shift.md + git diff 5d5ff80 HEAD -- docs/feature_auto_shift.md | cat +--> + +キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません! + +## なぜ自動シフトなのですか? + +多くの人が腱鞘炎などの症状に苦しんでいます。一般的な原因は、指を繰り返し長い距離を伸ばすことです。私たちはキーボード上でシフトキーに手を伸ばすためにあまりにも頻繁に小指を伸ばします。自動シフトキーはそれを軽減しようとしています。 + +## どのように動作しますか? + +キーをタップする時に、キーを放す前にほんの短い間押したままにします。この押したままにする時間は全ての人にとって異なる長さです。自動シフトは、定数 `AUTO_SHIFT_TIMEOUT` を定義し、これは普段の押された状態の時間の2倍に通常は設定されます。タイマーは、キーを押す時に開始され、キーを放す時に止まります。押された時間が `AUTO_SHIFT_TIMEOUT` 以上の場合に、キーのシフトバージョンが発行されます。時間が `AUTO_SHIFT_TIMEOUT` 時間よりも短い場合は、通常の状態が発行されます。 + +## 自動シフトには制限がありますか? + +残念ながらあります。 + +1. キーリピートが動作しなくなります。例えば、20個の 'a' 文字が必要な場合、'a' キーを1、2秒押し続けるかもしれません。オペレーティングシステムに押されたキーの状態を発行する代わりに押された時間を計るので、自動シフトでは動作しません。 +2. シフトをするつもりがない時にシフトされた文字を取得し、シフトしたい時にそうではない他の文字を取得するでしょう。これは結局は練習になります。急いでいる時は、シフトされたバージョンのために十分長くキーを押したと思うかもしれませんが、そうではありませんでした。一方、キーをタップしていると思うかもしれませんが、実際には予想よりも少し長い間押していました。 + +## どうやって自動シフトを有効にしますか? + +キーマップフォルダの `rules.mk` に追加します: + + AUTO_SHIFT_ENABLE = yes + +`rules.mk` が存在しない場合、それを作成することができます。 + +そして自動シフトキーを有効にした新しいファームウェアをコンパイルしてインストールします!以上です! + +## モディファイア + +デフォルトで、1つ以上のモディファイアと一緒にキーが押されると自動シフトは無効になります。従って、本当に長い間 Ctrl+A を保持しても、Ctrl+Shift+A と同じではありません。 + +`config.h` に定義を追加することで、モディファイアの自動シフトを再度有効にすることができます + +```c +#define AUTO_SHIFT_MODIFIERS +``` + +この場合、`AUTO_SHIFT_TIMEOUT` を超えて押された Ctrl+A は Ctrl+Shift+A として送信されます + + +## 自動シフトの設定 + +必要に応じて、自動シフトの挙動を変更することができる幾つかの設定があります。キーマップフォルダにある `config.h` に様々な変数を設定することで行われます。`config.h` ファイルが存在しない場合、それを作成することができます。 + +例 + +```c +#pragma once + +#define AUTO_SHIFT_TIMEOUT 150 +#define NO_AUTO_SHIFT_SPECIAL +``` + +### AUTO_SHIFT_TIMEOUT (単位: ミリ秒) + +これは、シフトされた状態を取得するためにどれだけ長くキーを押し続けなければならないかを制御します。 +明らかにこれは人によって異なります。一般的な人にとって、135 から 150 の設定がうまく機能します。ただし、少なくとも 175 の値から開始する必要があります。これはデフォルト値です。その後、ここから下げていきます。間違って検出することなくシフトされた状態を取得するのに必要な、最も短い時間を得るという考え方です。 + +完璧に動作するまで、いろいろな値を試してみます。多くの人は、全てが所定の値で適切に動作するものの、時々、1つあるいは2つのキーがシフト状態を発行することが分かるでしょう。これは単に習慣と、幾つかのキーを他のキーよりも少し長く押し続けることによるものです。この値を見つけたら、問題のキーを通常よりも少し早くタップするとともに、その値を設定します。 + +?> 自動シフトには、この値を素早く取得するのに役立つ3つの特別なキーがあります。詳細は「自動シフトのセットアップ」を見てください! + +### NO_AUTO_SHIFT_SPECIAL (単純にこのように定義します) + +-\_, =+, [{, ]}, ;:, '", ,<, .> および /? を含む特殊キーを自動シフトしません + +### NO_AUTO_SHIFT_NUMERIC (単純にこのように定義します) + +0から9までの数字キーを自動シフトしません。 + +### NO_AUTO_SHIFT_ALPHA (単純にこのように定義します) + +AからZを含むアルファベット文字を自動シフトしません。 + +## 自動シフトセットアップの使用 + +これにより、`AUTO_SHIFT_TIMEOUT` で設定している時間を一時的に増減させたり報告するために、3つのキーを定義することができます。 + +### セットアップ + +3つのキーを一時的にキーマップにマップします: + +| キー名 | 説明 | +|----------|-----------------------------------------------------| +| KC_ASDN | 自動シフトタイムアウト変数を下げる | +| KC_ASUP | 自動シフトタイムアウト変数を上げる | +| KC_ASRP | 現在の自動シフトタイムアウト値を報告する | +| KC_ASON | 自動シフト機能をオンにする | +| KC_ASOFF | 自動シフト機能をオフにする | +| KC_ASTG | 自動シフト機能の状態を切り替える | + +新しいファームウェアをコンパイルしてアップロードします。 + +### 使い方 + +これらのテスト中は、完全に普段通り入力する必要があり、意図的にシフトされたキーを使わずに入力するように注意する必要があります。 + +1. アルファベットの複数の文を入力します。 +2. 大文字に注意してください。 +3. 大文字が存在しない場合は、自動シフトタイムアウト値を減らすために `KC_ASDN` にマップしたキーを押し、ステップ1に戻ります。 +4. 大文字が幾つかある場合は、押す時間を短くしてこれらのキーをタップする必要があるか、あるいはタイムアウトを増やす必要があるかを決定します。 +5. タイムアウトを増やすことに決めた場合は、`KC_ASUP` にマップしたキーを押し、ステップ1に戻ります。 +6. 結果に満足したら、`KC_ASRP` にマップしたキーを押します。キーボードは `AUTO_SHIFT_TIMEOUT` の値を自動的に入力します。 +7. 報告された値で `config.h` の `AUTO_SHIFT_TIMEOUT` を更新します。 +8. `config.h` から `AUTO_SHIFT_SETUP` を削除します。 +9. `KC_ASDN`、`KC_ASUP` および `KC_ASRP` のキーバインディングを削除します。 +10. 新しいファームウェアをコンパイルしてアップロードします。 + +#### 実行例 + + hello world. my name is john doe. i am a computer programmer playing with + keyboards right now. + + [KC_ASDN を何度か押します] + + heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH + KEYboArDS RiGHT NOw. + + [KC_ASUP を数回押します] + + hello world. my name is john Doe. i am a computer programmer playing with + keyboarDs right now. + + [KC_ASRPを押します] + + 115 + +キーボードは現在の `AUTO_SHIFT_TIMEOUT` 値を表す `115` を入力しました。これで設定が完了しました!テスト中に現れる *D* キーを少し練習してください。それで完璧です。 diff --git a/docs/ja/feature_backlight.md b/docs/ja/feature_backlight.md new file mode 100644 index 0000000000..e722656b79 --- /dev/null +++ b/docs/ja/feature_backlight.md @@ -0,0 +1,253 @@ +# バックライト + +<!--- + original document: 5d5ff80:docs/feature_backlight.md + git diff 5d5ff80 HEAD -- docs/feature_backlight.md | cat +--> + +多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。 + +QMK は *パルス幅変調*(*Pulse Width Modulation*) すなわち PWM として知られている技術で急速にオンおよびオフを切り替えることで、これらの LED の輝度を制御できます。PWM 信号のデューティサイクルを変えることで、調光の錯覚を起こすことができます。 + +MCU は、GPIO ピンにはそんなに電流を供給できません。MCU から直接バックライトに給電せずに、バックライトピンは LED への電力を切り替えるトランジスタあるいは MOSFET に接続されます。 + +## 機能の設定 + +ほとんどのキーボードではバックライトをサポートしている場合にデフォルトで有効になっていますが、もし機能しない場合は `rules.mk` が以下を含んでいることを確認してください: + +```makefile +BACKLIGHT_ENABLE = yes +``` + +## キーコード +有効にすると、以下のキーコードを使ってバックライトレベルを変更することができます。 + +| キー | 説明 | +|---------|------------------------------------------| +| `BL_TOGG` | バックライトをオンあるいはオフにする | +| `BL_STEP` | バックライトレベルを循環する | +| `BL_ON` | バックライトを最大輝度に設定する | +| `BL_OFF` | バックライトをオフにする | +| `BL_INC` | バックライトレベルを上げる | +| `BL_DEC` | バックライトレベルを下げる | +| `BL_BRTG` | バックライトの明滅動作を切り替える | + +## バックライト関数群 + +| 関数 | 説明 | +|----------|-----------------------------------------------------------| +| `backlight_toggle()` | バックライトをオンあるいはオフにする | +| `backlight_enable()` | バックライトをオンにする | +| `backlight_disable()` | バックライトをオフにする | +| `backlight_step()` | バックライトレベルを循環する | +| `backlight_increase()` | バックライトレベルを上げる | +| `backlight_decrease()` | バックライトレベルを下げる | +| `backlight_level(x)` | バックライトのレベルを特定のレベルに設定する | +| `get_backlight_level()` | 現在のバックライトレベルを返す | +| `is_backlight_enabled()` | バックライトが現在オンかどうかを返す | + +### バックライトの明滅動作の関数群 + +| 関数 | 説明 | +|----------|---------------------------------------------------| +| `breathing_toggle()` | バックライトの明滅動作をオンまたはオフにする | +| `breathing_enable()` | バックライトの明滅動作をオンにする | +| `breathing_disable()` | バックライトの明滅動作をオフにする | + +## ドライバの設定 + +どのドライバを使うかを選択するには、以下を使って `rules.mk` を設定します: + +```makefile +BACKLIGHT_DRIVER = software # 有効なドライバの値は 'pwm,software,no' です +``` + +各ドライバについてのヘルプは以下を見てください。 + +## 共通のドライバ設定 + +バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: + +| 定義 | デフォルト | 説明 | +|---------------------|-------------|--------------------------------------------------------------------------------------| +| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | +| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | +| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | +| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | +| `BACKLIGHT_ON_STATE` | `0` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | + +### バックライトオン状態 + +ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。 +ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。 + +この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。 + +## AVR ドライバ + +AVR ボードでは、デフォルトのドライバは現在のところ最善のシナリオを選択するために構成を探っています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです: +```makefile +BACKLIGHT_DRIVER = pwm +``` + +### 注意事項 + +ハードウェア PWM は以下の表に従ってサポートされます: + +| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P | +|-------------|-------------|-------------|-------------|---------|----------| +| `B1` | | | | | Timer 1 | +| `B2` | | | | | Timer 1 | +| `B5` | Timer 1 | Timer 1 | | | | +| `B6` | Timer 1 | Timer 1 | | | | +| `B7` | Timer 1 | Timer 1 | Timer 1 | | | +| `C4` | Timer 3 | | | | | +| `C5` | Timer 3 | | Timer 1 | | | +| `C6` | Timer 3 | Timer 3 | Timer 1 | | | +| `D4` | | | | Timer 1 | | +| `D5` | | | | Timer 1 | | + +他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます: + +| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ | +|---------|-----------|------------------| +| `C4` | Timer 3 | Timer 1 | +| `C5` | Timer 3 | Timer 1 | +| `C6` | Timer 3 | Timer 1 | +| `B5` | Timer 1 | Timer 3 | +| `B6` | Timer 1 | Timer 3 | +| `B7` | Timer 1 | Timer 3 | + +両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。 + +### AVR 設定 + +バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: + +| 定義 | デフォルト | 説明 | +|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | +| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | +| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | +| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | +| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | +| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | + +### バックライトオン状態 + +ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。 +ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。 + +この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。 + +### 複数のバックライトピン + +ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。 +ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。 +この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。 + +複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります: + +```c +#define BACKLIGHT_LED_COUNT 2 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +``` + +### ハードウェア PWM 実装 + +バックライト用にサポートされているピンを使う場合、QMK は PWM 信号を出力するように設定されたハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。 +希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値まで達すると、バックライトピンは low になり、カウンタがリセットされると再び high になります。 +このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。`0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。 + +明滅動作の効果はカウンタがリセットされる(秒間あたりおよそ244回)たびに呼び出される `TIMER1_OVF_vect` の割り込みハンドラを登録することで可能になります。 +このハンドラ内で、増分カウンタの値が事前に計算された輝度曲線にマップされます。明滅動作をオフにするには、割り込みを単純に禁止し、輝度を EEPROM に格納されているレベルに再設定します。 + +### タイマーにアシストされた PWM 実装 + +`BACKLIGHT_PIN` がハードウェアバックライトピンに設定されていない場合、QMK はソフトウェア割り込みを引き起こすように設定されているハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。 +0 に再設定すると、CPU は LED をオンにする OVF (オーバーフロー)割り込みを発火し、デューティサイクルを開始します。 +希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値に達すると、CPU は比較出力一致割り込みを発火し、LED をオフにします。 +このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。 `0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。 + +明滅の効果はハードウェア PWM 実装と同じです。 + +## ARM ドライバ + +まだ初期段階ですが、ARM バックライトサポートは最終的に AVR と同等の機能を持つことを目指しています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです: +```makefile +BACKLIGHT_DRIVER = pwm +``` + +### 注意事項 + +現在のところ、ハードウェア PWM のみがサポートされ、タイマーはアシストされず、自動設定は提供されません。 + +?> STMF072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、rules.mk で `BACKLIGHT_ENABLE = no` を設定します。 + +### ARM 設定 + +バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: + +| 定義 | デフォルト | 説明 | +|------------------------|-------------|-------------------------------------------------------------------------------------------------------------| +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | + +## Software PWM Driver :id=software-pwm-driver + +他のキーボードのタスクを実行中に PWM をエミュレートすることにより、追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、rules.mk に以下を追加します: +```makefile +BACKLIGHT_DRIVER = software +``` + +### ソフトウェア PWM 設定 + +バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: + +| 定義 | デフォルト | 説明 | +|-----------------|-------------|-------------------------------------------------------------------------------------------------------------| +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | + +### 複数のバックライトピン + +ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。 +ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。 +この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。 + +複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります: + +```c +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +``` + +## カスタムドライバ + +有効にするには、rules.mk に以下を追加します: + +```makefile +BACKLIGHT_DRIVER = custom +``` + +カスタムドライバ API を実装する場合、提供されるキーボードフックは以下の通りです: + +```c +void backlight_init_ports(void) { + // オプション - 起動時に実行されます + // - 通常、ここでピンを設定します +} +void backlight_set(uint8_t level) { + // オプション - レベルの変更時に実行されます + // - 通常、ここで新しい値に応答します +} + +void backlight_task(void) { + // オプション - 定期的に実行されます + // - ここで長時間実行されるアクションはパフォーマンスの問題を引き起こします +} +``` diff --git a/docs/ja/feature_bluetooth.md b/docs/ja/feature_bluetooth.md new file mode 100644 index 0000000000..90b88bd7c2 --- /dev/null +++ b/docs/ja/feature_bluetooth.md @@ -0,0 +1,52 @@ +# Bluetooth + +<!--- + original document: 5d5ff80:docs/feature_bluetooth.md + git diff 5d5ff80 HEAD -- docs/feature_bluetooth.md | cat +--> + +## Bluetooth の既知のサポートハードウェア + +現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールと、Bluefruit EZ-Key をサポートしますが、後者はもう生産されていません。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 + +| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ | +|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| +| [Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) | Bluetooth Classic | UART | `BLUETOOTH = AdafruitEZKey` | | +| Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 | +| [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 | + +まだサポートされていませんが、可能性のあるもの: +* [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479)。[tmk 実装がおそらく見つかります](https://github.com/tmk/tmk_keyboard/issues/514) +* RN-42 ファームウェアが書き込まれた HC-05 ボード。どちらも明らかに CSR BC417 チップを使っています。RN-42 ファームウェアを使って書き込むと、HID 機能が提供されます。 +* Sparkfun Bluetooth Mate +* HM-13 ベースのボード + +### Adafruit BLE SPI Friend +現在のところ QMK によってサポートされている唯一の bluetooth チップセットは、Adafruit Bluefruit SPI Friend です。Adafruit のカスタムファームウェアを実行する Nordic nRF5182 ベースのチップです。データは Hardware SPI を介した Adafruit の SDEP を使って転送されます。[Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) は Adafruit ファームウェアを搭載した Nordic BLE チップに SPI 経由で接続された AVR mcu であるため、サポートされます。SPI friend を使ってカスタムボードを構築する場合、32u4 feather が使用するピン選択を使うのが最も簡単ですが、以下の定義で config.h オプションでピンを変更することができます: +* #define AdafruitBleResetPin D4 +* #define AdafruitBleCSPin B4 +* #define AdafruitBleIRQPin E6 + +Bluefruit UART friend は SPI friend に変換することができますが、これにはMDBT40 チップへの直接の再書き込みとはんだ付けが[必要です](https://github.com/qmk/qmk_firmware/issues/2274)。 + +## Adafruit EZ-Key hid +これには[ハードウェアの変更](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts)が必要ですが、Makefile を使って有効にすることができます。ファームウェアは引き続き USB 経由で文字を出力するため、コンピュータ経由で充電する場合は注意してください。任意にオフにするために Bluefruit 上にスイッチを持つことは理にかなっています。 + + +<!-- FIXME: Document bluetooth support more completely. --> +## Bluetooth の Rules.mk オプション +これらのうちの1つだけを使ってください +* BLUETOOTH_ENABLE = yes (レガシーオプション) +* BLUETOOTH = RN42 +* BLUETOOTH = AdafruitEZKey +* BLUETOOTH = AdafruitBLE + +## Bluetooth キーコード + +これは複数のキーボードの出力が選択できる場合に使われます。現在のところ、これは USB と Bluetooth の両方をサポートするキーボードで、それらの間の切り替えのみが可能です。 + +| 名前 | 説明 | +|----------|----------------------------------------------| +| `OUT_AUTO` | USB と Bluetooth を自動的に切り替える | +| `OUT_USB` | USB のみ | +| `OUT_BT` | Bluetooth のみ | diff --git a/docs/ja/feature_bootmagic.md b/docs/ja/feature_bootmagic.md new file mode 100644 index 0000000000..1f38914eda --- /dev/null +++ b/docs/ja/feature_bootmagic.md @@ -0,0 +1,171 @@ +# ブートマジック + +<!--- + original document: 5d5ff80:docs/feature_bootmagic.md + git diff 5d5ff80 HEAD -- docs/feature_bootmagic.md | cat +--> + +再書き込みせずにキーボードの挙動を変更することができる、3つの独立した関連する機能があります。それぞれは似たような機能を持ちますが、キーボードがどのように設定されているかによって異なる方法でアクセスされます。 + +**ブートマジック**は初期化の間にキーボードを設定するためのシステムです。ブートマジックコマンドを起動するには、ブートマジックキーと1つ以上のコマンドキーを押し続けます。 + +**ブートマジックキーコード** は前に `MAGIC_` が付いており、キーボードが初期化された*後で*ブートマジックの機能にアクセスすることができます。キーコードを使うには、他のキーコードと同じようにそれらをキーマップに割り当てます。 + +以前は**マジック**として知られていた**コマンド**は、キーボードの異なる側面を制御することができる別の機能です。ブートマジックと一部の機能を共有しますが、コンソールにバージョン情報を出力するような、ブートマジックにはできないこともできます。詳細は、[コマンド](ja/feature_command.md)を見てください。 + +一部のキーボードでは、ブートマジックはデフォルトで無効になっています。その場合、`rules.mk` 内で以下のように明示的に有効にする必要があります: + +```make +BOOTMAGIC_ENABLE = full +``` + +?> `full` の代わりに `yes` が使われていることがあるかもしれませんが、これは問題ありません。ただし、`yes` は非推奨で、理想的には `full` (あるいは`lite`) が使われるべきです。 + +さらに、以下を `rules.mk` ファイルに追加することで、[ブートマジックライト](#bootmagic-lite) (スケールダウンした、とても基本的なバージョンのブートマジック)を使うことができます: + +```make +BOOTMAGIC_ENABLE = lite +``` + +## ホットキー + +キーボードを接続しながら、ブートマジックキー(デフォルトはスペース)と目的のホットキーを押します。例えば、スペースと `B` を押したままにすると、ブートローダに入ります。 + +| ホットキー | 説明 | +|------------------|---------------------------------------------| +| エスケープ | EEPROM のブートマジック設定を無視する | +| `B` | ブートローダに入る | +| `D` | シリアルを介するデバッグ出力の切り替え | +| `X` | キーマトリックスのデバッグ出力の切り替え | +| `K` | キーボードのデバッグの切り替え | +| `M` | マウスのデバッグの切り替え | +| `L` | EE_HANDS 左右設定に、"左手"を設定 | +| `R` | EE_HANDS 左右設定に、"右手"を設定 | +| Backspace | EEPROM をクリア | +| Caps Lock | Caps Lock を左コントロールとして扱うかを切り替え | +| 左 Control | Caps Lock と左コントロールの入れ替えを切り替え | +| 左 Alt | 左 Alt と左 GUI の入れ替えを切り替え | +| 右 Alt | 右 Alt と右 GUI の入れ替えを切り替え | +| 左 GUI | GUI キーの有効・無効を切り替え (ゲームの時に便利です) | +| <code>`</code> | <code>`</code> とエスケープの入れ替えを切り替え | +| `\` | `\` とバックスペースの入れ替えを切り替え | +| `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え | +| `0` | レイヤー 0 をデフォルトレイヤーにする | +| `1` | レイヤー 1 をデフォルトレイヤーにする | +| `2` | レイヤー 2 をデフォルトレイヤーにする | +| `3` | レイヤー 3 をデフォルトレイヤーにする | +| `4` | レイヤー 4 をデフォルトレイヤーにする | +| `5` | レイヤー 5 をデフォルトレイヤーにする | +| `6` | レイヤー 6 をデフォルトレイヤーにする | +| `7` | レイヤー 7 をデフォルトレイヤーにする | + +## キーコード :id=keycodes + +| キー | エイリアス | 説明 | +|----------------------------------|---------|--------------------------------------------------------------------------| +| `MAGIC_SWAP_CONTROL_CAPSLOCK` | `CL_SWAP` | Caps Lock と左コントロールの入れ替え | +| `MAGIC_UNSWAP_CONTROL_CAPSLOCK` | `CL_NORM` | Caps Lock と左コントロールの入れ替えの解除 | +| `MAGIC_CAPSLOCK_TO_CONTROL` | `CL_CTRL` | Caps Lock をコントロールとして扱う | +| `MAGIC_UNCAPSLOCK_TO_CONTROL` | `CL_CAPS` | Caps Lock をコントロールとして扱うことを止める | +| `MAGIC_SWAP_LCTL_LGUI` | `LCG_SWP` | 左コントロールと GUI の入れ替え | +| `MAGIC_UNSWAP_LCTL_LGUI` | `LCG_NRM` | 左コントロールと GUI の入れ替えを解除 | +| `MAGIC_SWAP_RCTL_RGUI` | `RCG_SWP` | 右コントロールと GUI の入れ替え | +| `MAGIC_UNSWAP_RCTL_RGUI` | `RCG_NRM` | 右コントロールと GUI の入れ替えを解除 | +| `MAGIC_SWAP_CTL_GUI` | `CG_SWAP` | 両側のコントロールと GUI の入れ替え | +| `MAGIC_UNSWAP_CTL_GUI` | `CG_NORM` | 両側のコントロールと GUI の入れ替えを解除 | +| `MAGIC_TOGGLE_CTL_GUI` | `CG_TOGG` | 両側のコントロールと GUI の入れ替えの切り替え | +| `MAGIC_SWAP_LALT_LGUI` | `LAG_SWP` | 左 Alt と GUI の入れ替え | +| `MAGIC_UNSWAP_LALT_LGUI` | `LAG_NRM` | 左 Alt と GUI の入れ替えを解除 | +| `MAGIC_SWAP_RALT_RGUI` | `RAG_SWP` | 右 Alt と GUI の入れ替え | +| `MAGIC_UNSWAP_RALT_RGUI` | `RAG_NRM` | 右 Alt と GUI の入れ替えを解除 | +| `MAGIC_SWAP_ALT_GUI` | `AG_SWAP` | 両側の Alt と GUI の入れ替え | +| `MAGIC_UNSWAP_ALT_GUI` | `AG_NORM` | 両側の Alt と GUI の入れ替えを解除 | +| `MAGIC_TOGGLE_ALT_GUI` | `AG_TOGG` | 両側の Alt と GUI の入れ替えの切り替え | +| `MAGIC_NO_GUI` | `GUI_OFF` | GUI キーを無効にする | +| `MAGIC_UNNO_GUI` | `GUI_ON` | GUI キーを有効にする | +| `MAGIC_SWAP_GRAVE_ESC` | `GE_SWAP` | <code>`</code> とエスケープの入れ替え | +| `MAGIC_UNSWAP_GRAVE_ESC` | `GE_NORM` | <code>`</code> とエスケープの入れ替えを解除 | +| `MAGIC_SWAP_BACKSLASH_BACKSPACE` | `BS_SWAP` | `\` とバックスペースを入れ替え | +| `MAGIC_UNSWAP_BACKSLASH_BACKSPACE` | `BS_NORM` | `\` とバックスペースの入れ替えを解除する | +| `MAGIC_HOST_NKRO` | `NK_ON` | N キーロールオーバーを有効にする | +| `MAGIC_UNHOST_NKRO` | `NK_OFF` | N キーロールオーバーを無効にする | +| `MAGIC_TOGGLE_NKRO` | `NK_TOGG` | N キーロールオーバーの有効・無効を切り替え | +| `MAGIC_EE_HANDS_LEFT` | `EH_LEFT` | 分割キーボードのマスター側を左手に設定(`EE_HANDS` 用) | +| `MAGIC_EE_HANDS_RIGHT` | `EH_RGHT` | 分割キーボードのマスター側を右手に設定(`EE_HANDS` 用) | + +## 設定 + +ブートマジックのためのホットキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。 + +| 定義 | デフォルト | 説明 | +|----------------------------------------|-------------|---------------------------------------------------| +| `BOOTMAGIC_KEY_SALT` | `KC_SPACE` | ブートマジックキー | +| `BOOTMAGIC_KEY_SKIP` | `KC_ESC` | EEPROM のブートマジック設定を無視する | +| `BOOTMAGIC_KEY_EEPROM_CLEAR` | `KC_BSPACE` | EEPROM 設定をクリアする | +| `BOOTMAGIC_KEY_BOOTLOADER` | `KC_B` | ブートローダに入る | +| `BOOTMAGIC_KEY_DEBUG_ENABLE` | `KC_D` | シリアルを介するデバッグ出力の切り替え | +| `BOOTMAGIC_KEY_DEBUG_MATRIX` | `KC_X` | マトリックスのデバッグを切り替え | +| `BOOTMAGIC_KEY_DEBUG_KEYBOARD` | `KC_K` | キーボードのデバッグの切り替え | +| `BOOTMAGIC_KEY_DEBUG_MOUSE` | `KC_M` | マウスのデバッグの切り替え | +| `BOOTMAGIC_KEY_EE_HANDS_LEFT` | `KC_L` | EE_HANDS 左右設定に、"左手"を設定 | +| `BOOTMAGIC_KEY_EE_HANDS_RIGHT` | `KC_R` | EE_HANDS 左右設定に、"右手"を設定 | +| `BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` | `KC_LCTRL` | 左コントロールと Caps Lock の入れ替え | +| `BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` | `KC_CAPSLOCK` | Caps Lock を左コントロールとして扱うかを切り替え | +| `BOOTMAGIC_KEY_SWAP_LALT_LGUI` | `KC_LALT` | 左 Alt と左 GUI の入れ替えを切り替え (macOS 用) | +| `BOOTMAGIC_KEY_SWAP_RALT_RGUI` | `KC_RALT` | 右 Alt と右 GUI の入れ替えを切り替え (macOS 用) | +| `BOOTMAGIC_KEY_NO_GUI` | `KC_LGUI` | GUI キーの有効・無効を切り替え (ゲームの時に便利です) | +| `BOOTMAGIC_KEY_SWAP_GRAVE_ESC` | `KC_GRAVE` | <code>`</code> とエスケープの入れ替えを切り替え | +| `BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE` | `KC_BSLASH` | `\` とバックスペースの入れ替えを切り替え | +| `BOOTMAGIC_HOST_NKRO` | `KC_N` | N キーロールオーバー (NKRO) の有効・無効を切り替え | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_0` | `KC_0` | レイヤー 0 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_1` | `KC_1` | レイヤー 1 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_2` | `KC_2` | レイヤー 2 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_3` | `KC_3` | レイヤー 3 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_4` | `KC_4` | レイヤー 4 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_5` | `KC_5` | レイヤー 5 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_6` | `KC_6` | レイヤー 6 をデフォルトレイヤーにする | +| `BOOTMAGIC_KEY_DEFAULT_LAYER_7` | `KC_7` | レイヤー 7 をデフォルトレイヤーにする | + +# ブートマジックライト :id=bootmagic-lite + +本格的なブートマジック機能の他に、ブートローダへのジャンプのみを処理するブートマジックライトがあります。これは、物理的なリセットボタンが無くブートローダにジャンプする方法が必要だが、ブートマジックが引き起こす問題を扱いたくないキーボードに適しています。 + +ブートマジックのこのバージョンを有効にするには、以下を使って `rules.mk` で有効にする必要があります: + +```make +BOOTMAGIC_ENABLE = lite +``` + +さらに、どのキーを使うかを指定したほうが良いかもしれません。これは普通ではないマトリックスを持つキーボードで特に便利です。そのためには、使いたいキーの行と列を指定する必要があります。`config.h` ファイルにこれらのエントリを追加します: + +```c +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 1 +``` + +デフォルトでは、これらは 0 と 0 に設定されます。これは通常はほとんどのキーボードで "ESC" キーです。 + +ブートローダを起動するには、キーボードを接続する時にこのキーを押し続けます。たった1つのキーです。 + +!> ブートマジックライトを使用すると、EEPROM を**常にリセットします**。つまり保存された全ての設定は失われます。 + +## 高度なブートマジックライト + +`bootmagic_lite` 関数は必要に応じてコード内で置き換えることができるように、弱く定義されています。これの良い例は Zeal60 キーボードで、追加の処理が必要です。 + +関数を置き換えるには、以下のようなものをコードに追加するだけです: + +```c +void bootmagic_lite(void) { + matrix_scan(); + wait_ms(DEBOUNCE * 2); + matrix_scan(); + + if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { + // ブートローダにジャンプする。 + bootloader_jump(); + } +} +``` + +追加の機能をここに追加することができます。例えば、eeprom のリセットやブートマジックを起動するために押す必要がある追加のキーです。`bootmagic_lite` はファームウェア内で大部分の機能が初期化される前に呼ばれることに注意してください。 diff --git a/docs/ja/hardware_avr.md b/docs/ja/hardware_avr.md new file mode 100644 index 0000000000..6eb86a3786 --- /dev/null +++ b/docs/ja/hardware_avr.md @@ -0,0 +1,189 @@ +# AVR マイコンを使ったキーボード + +<!--- + grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh + original document: c9e3fa6f7:docs/hardware_avr.md + git diff c9e3fa6f7 HEAD -- docs/hardware_avr.md | cat +--> + +このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。 + +まだ読んでない場合は、[キーボードガイドライン](ja/hardware_keyboard_guidelines.md) を読んで、キーボードを QMK にどのように適合させるかを把握する必要があります。 + +## AVR を使用したキーボードを QMK に追加する + +QMK には AVR を使ったキーボードでの作業を簡略化するための機能が多数あります。大体のキーボードでは1行もコードを書く必要がありません。まずはじめに、`util/new_keyboard.sh` スクリプトを実行します。 + +``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: + +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done + +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. +``` + +これにより、新しいキーボードをサポートするために必要なすべてのファイルが作成され、デフォルト値で設定が入力されます。あとはあなたのキーボード用にカスタマイズするだけです。 + +## `readme.md` + +このファイルではキーボードに関する説明を記述します。[キーボード Readme テンプレート](ja/documentation_templates.md#keyboard-readmemd-template)に従って `readme.md` を記入して下さい。`readme.md` の上部に画像を配置することをお勧めします。画像は [Imgur](http://imgur.com) のような外部サービスを利用してください。 + +## `<keyboard>.c` + +このファイルではキーボード上で実行される全てのカスタマイズされたロジックを記述します。多くのキーボードの場合、何も書く必要はありません。 +[機能のカスタマイズ](ja/custom_quantum_functions.md)で、カスタマイズされたロジックの記述方法を詳しく学ぶことが出来ます。 + +## `<keyboard>.h` + +このファイルでは、[レイアウト](ja/feature_layouts.md)を定義します。最低限、以下のような `#define LAYOUT` を記述する必要があります。 + +```c +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) { \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} +``` + +`LAYOUT` マクロの前半部ではキーの物理的な配置を定義します。後半部ではスイッチが接続されるマトリックスを定義します。これによってマトリックス配線の順とは異なるキーを物理的に配置できます。 + +それぞれの `k__` 変数はユニークでなければいけません。通常は `k<row><col>` というフォーマットに従って記述されます。 + +物理マトリックス(後半部)では、`MATRIX_ROWS` に等しい行数が必要であり、各行には正確に `MATRIX_COLS` と等しい数の要素が含まれていなければいけません。物理キーが存在しない場合は、`KC_NO` を使用して空白を埋める事ができます。 + +## `config.h` + +`config.h` ファイルには、ハードウェアや機能の設定を記述します。このファイルで設定できるオプションは列挙しきれないほどたくさんあります。利用できるオプションの概要は[設定オプション](ja/config_options.md)を参照して下さい。 + +### ハードウェアの設定 + +`config.h` の先頭には USB に関する設定があります。これらはキーボードが OS からどのように見えるかを制御しています。変更する理由がない場合は、`VENDOR_ID` を `0xFEED` のままにしておく必要があります。`PRODUCT_ID` にはまだ使用されていない番号を選ばなければいけません。 + +`MANUFACTURER`、 `PRODUCT`、 `DESCRIPTION` をキーボードにあった設定に変更します。 + +```c +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER You +#define PRODUCT my_awesome_keyboard +#define DESCRIPTION A custom keyboard +``` + +?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりにデフォルトで [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストからこれらを取得します。`lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。 + +### キーボードマトリックスの設定 + +`config.h` ファイルの次のセクションではキーボードのマトリックスを扱います。最初に設定するのはマトリックスのサイズです。これは通常、常にではありませんが、物理キー配置と同じ数の行・列になります。 + +```c +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 +``` + +マトリックスのサイズを定義したら、MCU のどのピンを行と列に接続するかを定義します。そのためにはピンの名前を指定するだけです。 + +```c +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS +``` + + +`MATRIX_ROW_PINS` の要素の数は `MATRIX_ROWS` に定義した数と同じでなければいけません。同様に `MATRIX_COL_PINS` の要素の数も `MATRIX_COLS` と等しい必要があります。`UNUSED_PINS` は定義しなくても問題ありませんがどのピンが空いているのか記録しておきたい場合は定義できます。 + +最後にダイオードの方向を定義します。これには `COL2ROW` か `ROW2COL` を設定します。 + +```c +#define DIODE_DIRECTION COL2ROW +``` + +#### ダイレクトピンマトリックス + +各スイッチが、列と行のピンを共有する代わりに、それぞれ個別のピンとグランドに接続されているキーボードを定義するには、`DIRECT_PINS` を使用します。マッピング定義では、列と行の各スイッチのピンを左から右の順に定義します。`MATRIX_ROWS` と `MATRIX_COLS` 内のサイズに準拠する必要があり、空白を埋めるには `NO_PIN` を使用します。これによって `DIODE_DIRECTION`、`MATRIX_ROW_PINS`、`MATRIX_COL_PINS` の動作を上書きします。 + +```c +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F1, E6, B0, B2, B3 }, \ + { F5, F0, B1, B7, D2 }, \ + { F6, F7, C7, D5, D3 }, \ + { B5, C6, B6, NO_PIN, NO_PIN } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION +``` + +### バックライトの設定 + +QMK では GPIO ピンでのバックライト制御をサポートしています。これらの設定を選択して MCU から制御できます。詳しくは[バックライト](ja/feature_backlight.md)を参照して下さい。 + +```c +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 +``` + +### その他の設定オプション + +`config.h` で設定・調整できる機能はたくさんあります。詳しくは[設定オプション](ja/config_options.md)を参照して下さい。 + +## `rules.mk` + +`rules.mk` ファイルを使用して、ビルドするファイルや有効にする機能をQMKへ指示します。atmega32u4 を使っている場合、これらのオプションはデフォルトのままにしておくことが出来ます。他の MCU を使用している場合はいくつかのパラメータを調整する必要があります。 + +### MCU オプション + +このオプションではビルドする CPU をビルドシステムに指示します。これらの設定を変更する場合は非常に注意して下さい。キーボードを操作不能にしてしまう可能性があります。 + +```make +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +``` + +### ブートローダー + +ブートローダーは MCU に保存されているプログラムをアップグレードするための特別なセクションです。キーボードのレスキューパーティションのようなものだと考えて下さい。 + +#### Teensy Bootloader の例 + +```make +BOOTLOADER = halfkay +``` + +#### Atmel DFU Loader の例 + +```make +BOOTLOADER = atmel-dfu +``` + +#### Pro Micro Bootloader の例 + +```make +BOOTLOADER = caterina +``` + +### ビルドオプション + +`rules.mk` にはオン・オフできるたくさんの機能があります。詳細なリストと説明は[設定オプション](ja/config_options.md#feature-options)を参照して下さい。 diff --git a/docs/ja/hardware_drivers.md b/docs/ja/hardware_drivers.md new file mode 100644 index 0000000000..cc85589e7b --- /dev/null +++ b/docs/ja/hardware_drivers.md @@ -0,0 +1,45 @@ +# QMK ハードウェアドライバー + +<!--- + grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh + original document: c9e3fa6f7:docs/hardware_drivers.md + git diff c9e3fa6f7 HEAD -- docs/hardware_drivers.md | cat +--> + +QMK はたくさんの異なるハードウェアで使われています。最も一般的な MCU とマトリックス構成をサポートしていますが、キーボードへ他のハードウェアを追加し制御するためのドライバーもいくつか用意されています。例えば、マウスやポインティングデバイス、分割キーボード用の IO エキスパンダ、Bluetooth モジュール、LCD、OLED、TFT 液晶などがあります。 + +<!-- FIXME: This should talk about how drivers are integrated into QMK and how you can add your own driver. + +# Driver System Overview + +--> + +# 使用できるドライバー + +## ProMicro (AVR のみ) + +ProMicro のピンを AVR の名前ではなく、Arduino の名前で指定できます。この部分はより詳しく文書化される必要があります。もしこれを使用したい場合にコードを読んでも分からない場合、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new)を通して助けることができるかもしれません。 + +## SSD1306 OLED ドライバー + +SSD1306 ベースの OLED ディスプレイのサポート。詳しくは[OLED ドライバ](ja/feature_oled_driver.md)を参照して下さい。 + +## uGFX + +QMK 内で uGFX を使用して、キャラクタ LCD やグラフィック LCD、LED アレイ、OLED ディスプレイ、TFT 液晶や他のディスプレイを制御できます。この部分はより詳しく文書化される必要があります。もしこれを使用したい場合にコードを読んでも分からない場合、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new)を通して助けることができるかもしれません。 + +## WS2812 + +WS2811/WS2812{a,b,c} LED のサポート。 詳しくは [RGB ライト](ja/feature_rgblight.md)を参照して下さい。 + +## IS31FL3731 + +最大2つの LED ドライバーのサポート。各ドライバーは、I2C を使って個別に LED を制御する2つのチャーリープレクスマトリックスを実装しています。最大144個の単色 LED か32個の RGB LED を使用できます。ドライバーの設定方法の詳細は[RGB マトリックス](ja/feature_rgb_matrix.md)を参照して下さい。 + +## IS31FL3733 + +拡張の余地がある最大1つの LED ドライバーのサポート。各ドライバーは192個の単色 LED か64個の RGB LED を制御できます。ドライバーの設定方法の詳細は [RGB マトリックス](ja/feature_rgb_matrix.md)を参照して下さい。 + +## 24xx シリーズ 外部 I2C EEPROM + +オンチップ EEPROM の代わりに使用する I2C ベースの外部 EEPROM のサポート。ドライバーの設定方法の詳細は [EEPROM ドライバー](ja/eeprom_driver.md)を参照して下さい。 diff --git a/docs/ja/hardware_keyboard_guidelines.md b/docs/ja/hardware_keyboard_guidelines.md new file mode 100644 index 0000000000..5a9de52ef4 --- /dev/null +++ b/docs/ja/hardware_keyboard_guidelines.md @@ -0,0 +1,155 @@ +# QMK キーボードガイドライン + +<!--- + grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh + original document: c9e3fa6f7:docs/hardware_keyboard_guidelines.md + git diff c9e3fa6f7 HEAD -- docs/hardware_keyboard_guidelines.md | cat +--> + +QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。 + +## あなたのキーボード/プロジェクトの名前を決める + +キーボードの名前は全て小文字で、アルファベット、数字、アンダースコア(`_`)のみで構成されています。アンダースコア(`_`)で始めてはいけません。スラッシュ(`/`)はサブフォルダの区切り文字として使用されます。 + +`test`、`keyboard`、`all` はmakeコマンド用に予約されており、キーボードまたはサブフォルダ名として使用することは出来ません。 + +正しい例: + +* `412_64` +* `chimera_ortho` +* `clueboard/66/rev3` +* `planck` +* `v60_type_r` + +## サブフォルダ + +QMK では、まとめるためや同じキーボードのリビジョン間でコードを共有するためにサブフォルダを使用します。フォルダは最大4階層までネストできます。 + + qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4 + +サブフォルダ内に `rules.mk` ファイルが存在するとコンパイル可能なキーボードとして見なされます。QMK Configurator から使用できるようになり、`make all` でテストされます。同じメーカーのキーボードをまとめるためにフォルダを使用している場合は `rules.mk` ファイルを置いてはいけません。 + +例: + +Clueboard は、サブフォルダをまとめるためとキーボードのリビジョン管理の両方のために使用しています。 + +* [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master) + * [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards) + * [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← これはまとめるためのフォルダです。 `rules.mk` ファイルはありません。 + * [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← これはコンパイルできるキーボードです。`rules.mk` が存在します。 + * [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← これもコンパイルできるキーボードです。 デフォルトのリビジョンとして `DEFAULT_FOLDER` に `rev3` を指定しています。 + * [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← コンパイル可能: `make clueboard/66/rev1` + * [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← コンパイル可能: `make clueboard/66/rev2` + * [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← コンパイル可能: `make clueboard/66/rev3` もしくは `make clueboard/66` + +## キーボードのフォルダ構成 + +キーボードは `qmk_firmware/keyboards/` 内にあり、前のセクションで説明したようにフォルダ名はキーボードの名前にする必要があります。このフォルダ内にはいくつかのファイルがあります。 + +* `readme.md` +* `info.json` +* `config.h` +* `rules.mk` +* `<keyboard_name>.c` +* `<keyboard_name>.h` + +### `readme.md` + +全てのプロジェクトにはどのようなキーボードなのか、誰が設計したか、どこで入手できるかを説明する `readme.md` ファイルが必要です。もしあれば、メーカーの Web サイトなどの詳しい情報へのリンクも含める必要があります。[キーボード readme テンプレート](ja/documentation_templates.md#keyboard-readmemd-template)を参考にして下さい。 + +### `info.json` + +このファイルは [QMK API](https://github.com/qmk/qmk_api) から使用されます。[QMK Configurator](https://config.qmk.fm/) が必要とするキーボードの情報が含まれています。ここでメタデータを設定することもできます。詳しくは [info.json 形式](ja/reference_info_json.md) を参照して下さい。 + +### `config.h` + +全てのプロジェクトには、マトリックスサイズ、製品名、USB VID/PID、説明、その他の設定などが含まれた `config.h` ファイルが必要です。一般に、このファイルを使用して常に機能するキーボードの重要な情報やデフォルトを設定します。 + +### `rules.mk` + +このファイルが存在するということは、フォルダがキーボードであり、`make` コマンドで使用できることを意味します。ここでキーボードのビルド環境を構築し、デフォルトの機能を設定します。 + +### `<keyboard_name.c>` + +ここではキーボードのカスタマイズされたコードを記述します。通常、初期化してキーボードのハードウェアを制御するコードを記述します。キーボードが LED やスピーカー、その他付属ハードウェアのないキーマトリックスのみで構成されている場合は空にできます。 + +通常、以下の関数がこのファイルで定義されます。 + +* `void matrix_init_kb(void)` +* `void matrix_scan_kb(void)` +* `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* `void led_set_kb(uint8_t usb_led)` + +### `<keyboard_name.h>` + +このファイルはキーボードのマトリックスを定義するために使用されます。配列をキーボードの物理的なスイッチマトリックスに変換する C マクロを最低限1つ定義する必要があります。複数のレイアウトでキーボードを構築出来る場合は、追加のマクロを定義しなければいけません。 + +レイアウトが1つしかない場合は、このマクロは `LAYOUT` とします。 + +複数のレイアウトを定義する場合、物理的に構成することが出来なくとも、マトリックス上で全てのスイッチ位置をサポートする `LAYOUT_all` という名前の基本となるレイアウトが必要です。これは `default` キーマップで使用すべきマクロです。次に、他のレイアウトマクロを使用する `default_<layout>` といった追加のキーマップを用意します。これによって、他の人が定義されたレイアウトを使いやすくなります。 + +レイアウトマクロの名前は全て小文字で、先頭の `LAYOUT` だけ大文字です。 + +例として、ANSI と ISO をサポートする 60% PCB がある場合、以下のようにレイアウトとキーマップを定義出来ます。 + +| レイアウト名 | キーマップ名 | 説明 | +|-------------|-------------|-------------| +| LAYOUT_all | default | ISO と ANSI のどちらもサポートしたレイアウト | +| LAYOUT_ansi | default_ansi | ANSI レイアウト | +| LAYOUT_iso | default_iso | ISO レイアウト | + +## 画像/ハードウェアのファイル + +リポジトリのサイズを小さく保つために、いくつかの例外を除いて、どの形式のバイナリファイルも受け入れないようになりました。外部の場所(<https://imgur.com>など)でホストして、`readme.md` でリンクすることをおすすめします。 + +ハードウェアのファイル(プレートやケース、PCB など)は [qmk.fm リポジトリ](https://github.com/qmk/qmk.fm)に提供でき、[qmk.fm](http://qmk.fm) で利用可能になります。ダウンロード出来るファイルは `/<keyboard>/`(名前は上記と同じ形式)に保存され、`http://qmk.fm/<keyboard>/` で提供されます。ページは `/_pages/<keyboard>/` から生成されて、同じ場所で提供されます( .mdファイルはJekyllを通して .htmlファイル変換されます)。`lets_split` ファイルを参照して下さい。 + +## キーボードのデフォルト設定 + +QMK が提供する機能の量を考えれば、新しいユーザーが混乱するのは当たり前です。キーボードのデフォルトファームウェアをまとめるなら、有効にする機能とオプションをハードウェアのサポートに必要な最低限のセットにすることをおすすめします。特定の機能に関するおすすめは以下の通りです。 + +### ブートマジックとコマンド + +[ブートマジック](ja/feature_bootmagic.md) と[コマンド](ja/feature_command.md)は、ユーザーがキーボードを明白でない方法で制御出来るようにする2つの関連機能です。いずれかの機能を有効にする場合、この機能をどのように提供するかについて、よく考えることをおすすめします。この機能が必要なユーザーは、あなたのキーボードを最初のプログラムできるキーボードとして使用している初心者に影響を与えることなく、個人的なキーマップ内で有効に出来ることを覚えておきましょう。 + +新規ユーザーが遭遇する最も多い問題は、キーボードを接続している間に間違えてブートマジックをトリガーしてしまうことです。キーボードの下を持っているとき、知らない間に Alt とスペースバーを押して、これらのキーが交換されてしまったことに気づきます。デフォルトではこの機能を無効にすることをおすすめしますが、有効にする場合は、キーボードを接続している間に押し間違えないキーへ `BOOTMAGIC_KEY_SALT` を設定することを検討して下さい。 + +キーボードに2つの Shift キーがない場合は、`COMMAND_ENABLE = no` を指定していても `IS_COMMAND` が動作するデフォルトを設定しておくべきです。ユーザーがコマンドを有効化したときに使用するデフォルトが与えられます。 + +## カスタムキーボードプログラミング + +[機能のカスタマイズ](ja/custom_quantum_functions.md)にあるようにキーボードのカスタム関数を定義できます。ユーザーも同様にその動作をカスタマイズしたいかもしれないということと、ユーザーにそれを可能にすることを忘れないで下さい。 `process_record_kb()`のようなカスタム関数を提供している場合、関数がその関数の `_user()` 版を呼び出すことを確認して下さい。また、その関数の`_user()` 版の戻り値を確認して、user が `true` を返した場合のみカスタムコードを実行しなければいけません。 + +## 生産しない/手配線 プロジェクト + +プロトタイプや手配線によるものなど QMK を使用するどんなプロジェクトも受け入れますが、`/keyboards/` フォルダが乱雑になるのを防ぐために、`/keyboards/handwired/` を用意しています。いつかプロトタイプのプロジェクトが製品のプロジェクトになった時点でメインの `/keyboards/` フォルダへ移動します! + +## エラーとしての警告 + +キーボードを開発するときは、全ての警告がエラーとして扱われることに注意して下さい。小さな警告が蓄積されて、将来大きなエラーを引き起こす可能性があります。(そして、警告を放っておくのは良くない習慣です) + +## 著作権表示 + +別のプロジェクトを元にしてキーボードの設定をするものの同じコードを使用しない場合は、ファイル上部にある著作権表示を次の形式に従って自分の名前を表示するよう、更新して下さい。 + + Copyright 2017 Your Name <your@email.com> + + +他の人のコードを修正し、その変更が些細な部分のみであれば、著作権表示の名前をそのままにしておかないといけません。ファイルに対して重要な作業を行った場合、以下のようにあなたの名前を追加します。 + + Copyright 2017 Their Name <original_author@example.com> Your Name <you@example.com> + +年はファイルが作成された最初の年にします。後年にそのファイルに対して作業が行われた場合、次のように2つ目の年を追加して反映することが出来ます。 + + Copyright 2015-2017 Your Name <you@example.com> + +## ライセンス + +QMK のコア部分は [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html) でライセンスされます。AVR マイコン用のバイナリを提供する場合は、[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) か、[GPLv3](https://www.gnu.org/licenses/gpl.html) のどちらかから選択出来ます。ARM マイコン用のバイナリを提供する場合は、 [ChibiOS](http://www.chibios.org) の GPLv3 ライセンスに準拠するため、[GPL Version 3](https://www.gnu.org/licenses/gpl.html) を選択しなければいけません。 + +[uGFX](https://ugfx.io) を使用している場合は、[uGFX License](https://ugfx.io/license.html) に準拠する必要があります。uGFX を利用したデバイスを販売するには個別に商用ライセンスを取得しなければいけません。 + +## 技術的な詳細 + +キーボードを QMK で動作させるための詳細は[ハードウェア](ja/hardware.md)を参照して下さい! diff --git a/docs/ja/i2c_driver.md b/docs/ja/i2c_driver.md index 4030da631a..56425a2fdb 100644 --- a/docs/ja/i2c_driver.md +++ b/docs/ja/i2c_driver.md @@ -1,38 +1,48 @@ -# I2C マスタドライバ +# I2C マスタドライバ :id=i2c-master-driver <!--- grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh - original document: 85041ff05:docs/i2c_driver.md - git diff 85041ff05 HEAD -- docs/i2c_driver.md | cat + original document: 0.8.62:docs/i2c_driver.md + git diff 0.8.62 HEAD -- docs/i2c_driver.md | cat --> QMK で使われる I2C マスタドライバには、MCU 間のポータビリティを提供するための一連の関数が用意されています。 -## 使用できる関数 +## I2C アドレスについての重要なメモ :id=note-on-i2c-addresses + +このドライバが期待する全てのアドレスは、アドレスバイトの上位7ビットにプッシュする必要があります。最下位ビットの設定(読み込み/書き込みを示す)は、それぞれの関数によって行われます。データシートやインターネットで列挙されているほとんど全ての I2C アドレスは、下位7ビットを占める7ビットとして表され、1ビット左(より上位)にシフトする必要があります。これは、ビット単位のシフト演算子 `<< 1` を使用して簡単に実行できます。 + +これは、呼び出しごとに以下の関数を実行するか、アドレスの定義で1度だけ実行するかどちらかで行うことができます。例えば、デバイスのアドレスが `0x18` の場合: + +`#define MY_I2C_ADDRESS (0x18 << 1)` + +I2C アドレスと他の技術詳細について、さらなる情報を得るためには https://www.robot-electronics.co.uk/i2c-tutorial を見てください。 + +## 使用できる関数 :id=available-functions | 関数 | 説明 | |-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `void i2c_init(void);` | I2C ドライバを初期化します。他のあらゆるトランザクションを開始する前に、この関数を一度だけ呼ぶ必要があります。 | -| `uint8_t i2c_start(uint8_t address, uint16_t timeout);` | I2C トランザクションを開始します。アドレスは方向ビットのない7ビットスレーブアドレスです。 | -| `uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを送信します。アドレスは方向ビットのない7ビットスレーブアドレスです。トランザクションのステータスを返します。 | -| `uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを受信します。アドレスは方向ビットのない7ビットスレーブアドレスです。 `length` で指定した長さのバイト列を `data` に保存し、トランザクションのステータスを返します。 | -| `uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_transmit` と同様ですが、 `regaddr` でスレーブのデータ書き込み先のレジスタを指定します。 | -| `uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_receive` と同様ですが、 `regaddr` でスレーブのデータ読み込み先のレジスタを指定します。 | -| `uint8_t i2c_stop(void);` | I2C トランザクションを終了します。 | +| `i2c_status_t i2c_start(uint8_t address, uint16_t timeout);` | I2C トランザクションを開始します。アドレスは方向ビットのない7ビットスレーブアドレスです。 | +| `i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを送信します。アドレスは方向ビットのない7ビットスレーブアドレスです。トランザクションのステータスを返します。 | +| `i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` | I2C 経由でデータを受信します。アドレスは方向ビットのない7ビットスレーブアドレスです。 `length` で指定した長さのバイト列を `data` に保存し、トランザクションのステータスを返します。 | +| `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_transmit` と同様ですが、 `regaddr` でスレーブのデータ書き込み先のレジスタを指定します。 | +| `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` | `i2c_receive` と同様ですが、 `regaddr` でスレーブのデータ読み込み先のレジスタを指定します。 | +| `i2c_status_t i2c_stop(void);` | I2C トランザクションを終了します。 | -### 関数の戻り値 +### 関数の戻り値 :id=function-return `void i2c_init(void)` を除く上にあるすべての関数は、次の真理値表にある値を返します。 -| 戻り値 | 説明 | -|--------|------------------------------| -| 0 | 処理が正常に実行されました。 | -| -1 | 処理に失敗しました。 | -| -2 | 処理がタイムアウトしました。 | +|戻り値の定数 |値 |説明 | +|--------------------|---|----------------------------| +|`I2C_STATUS_SUCCESS`|0 |処理が正常に実行されました。| +|`I2C_STATUS_ERROR` |-1 |処理に失敗しました。 | +|`I2C_STATUS_TIMEOUT`|-2 |処理がタイムアウトしました。| -## AVR +## AVR :id=avr -### 設定 +### 設定 :id=avr-configuration I2Cマスタドライバを設定するために、次の定義が使えます。 @@ -43,11 +53,11 @@ I2Cマスタドライバを設定するために、次の定義が使えます AVR は通常 I2C ピンとして使う GPIO が設定されているので、これ以上の設定は必要ありません。 -## ARM +## ARM :id=arm ARM の場合は、内部に ChibiOS I2C HAL ドライバがあります。この節では STM32 MCU を使用していると仮定します。 -### 設定 +### 設定 :id=arm-configuration ARM MCU 用の設定はしばしば非常に複雑です。これは、多くの場合複数の I2C ドライバをさまざまなポートに対して割り当てられるためです。 @@ -82,7 +92,7 @@ ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx, STM32L1xx では I2Cv1 が使われます。 STM32F0xx, STM32F3xx, STM32F7xx, STM32L4xx では I2Cv2 が使われます。 -#### I2Cv1 +#### I2Cv1 :id=i2cv1 STM32 MCU の I2Cv1 では、クロック周波数とデューティ比を次の変数で変更できます。詳しくは <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> を参照してください。 @@ -92,7 +102,7 @@ STM32 MCU の I2Cv1 では、クロック周波数とデューティ比を次の | `I2C1_CLOCK_SPEED` | `100000` | | `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` | -#### I2Cv2 +#### I2Cv2 :id=i2cv2 STM32 MCU の I2Cv2 では、信号のタイミングパラメータを次の変数で変更できます。詳しくは <https://www.st.com/en/embedded-software/stsw-stm32126.html> を参照してください。 @@ -111,11 +121,11 @@ STM32 MCU では GPIO ピンを設定するとき、別の「代替機能」モ | `I2C1_SCL_PAL_MODE` | `4` | | `I2C1_SDA_PAL_MODE` | `4` | -#### その他 +#### その他 :id=other `void i2c_init(void)` 関数は `weak` 属性が付いており、オーバーロードすることができます。この場合、上記で設定した変数は使用されません。可能な GPIO の設定については、 MCU のデータシートを参照してください。次に示すのは初期化関数の例です: -```C +```c void i2c_init(void) { setPinInput(B6); // Try releasing special pins for a short time diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 82d985c20a..5c3d72dcb5 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -20,12 +20,13 @@ * 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 "ws2812.h" #include <avr/interrupt.h> #include <avr/io.h> #include <util/delay.h> +#define pinmask(pin) (_BV((pin)&0xF)) + /* * Forward declare internal functions * @@ -33,20 +34,21 @@ * The length is the number of bytes to send - three per LED. */ -void ws2812_sendarray(uint8_t *array, uint16_t length); -void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); +static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi); // Setleds for standard RGB -void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { - // ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin)); - ws2812_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF)); +void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { + // wrap up usage of RGB_DI_PIN + ws2812_setleds_pin(ledarray, number_of_leds, RGB_DI_PIN); } -void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask) { - // new universal format (DDR) - _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask; +void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin) { + DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(pin); - ws2812_sendarray_mask((uint8_t *)ledarray, leds * sizeof(LED_TYPE), pinmask); + uint8_t masklo = ~(pinmask(pin)) & PORTx_ADDRESS(pin); + uint8_t maskhi = pinmask(pin) | PORTx_ADDRESS(pin); + + ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi); #ifdef RGBW _delay_us(80); @@ -55,8 +57,6 @@ void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmas #endif } -void ws2812_sendarray(uint8_t *data, uint16_t datlen) { ws2812_sendarray_mask(data, datlen, _BV(RGB_DI_PIN & 0xF)); } - /* This routine writes an array of bytes with RGB values to the Dataout pin using the fast 800kHz clockless WS2811/2812 protocol. @@ -118,14 +118,9 @@ void ws2812_sendarray(uint8_t *data, uint16_t datlen) { ws2812_sendarray_mask(da #define w_nop8 w_nop4 w_nop4 #define w_nop16 w_nop8 w_nop8 -void inline ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t maskhi) { - uint8_t curbyte, ctr, masklo; - uint8_t sreg_prev; +static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi) { + uint8_t curbyte, ctr, sreg_prev; - // masklo =~maskhi&ws2812_PORTREG; - // maskhi |= ws2812_PORTREG; - masklo = ~maskhi & _SFR_IO8((RGB_DI_PIN >> 4) + 2); - maskhi |= _SFR_IO8((RGB_DI_PIN >> 4) + 2); sreg_prev = SREG; cli(); @@ -188,7 +183,7 @@ void inline ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t maskhi " dec %0 \n\t" // '1' [+2] '0' [+2] " brne loop%=\n\t" // '1' [+3] '0' [+4] : "=&d"(ctr) - : "r"(curbyte), "I"(_SFR_IO_ADDR(_SFR_IO8((RGB_DI_PIN >> 4) + 2))), "r"(maskhi), "r"(masklo)); + : "r"(curbyte), "I"(_SFR_IO_ADDR(PORTx_ADDRESS(RGB_DI_PIN))), "r"(maskhi), "r"(masklo)); } SREG = sreg_prev; diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index b869fb28c8..88eb081894 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -29,7 +29,7 @@ * Input: * ledarray: An array of GRB data describing the LED colors * number_of_leds: The number of LEDs to write - * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0) + * pin (optional): A pin_t definition for the line to drive * * The functions will perform the following actions: * - Set the data-out pin as output @@ -37,4 +37,4 @@ * - Wait 50us to reset the LEDs */ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); -void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); +void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin); diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index 803d9f1151..0fc117c5a1 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x6F75 // OU #define MANUFACTURER 1up Keyboards #define PRODUCT Sweet16 #define DESCRIPTION 4x4 grid diff --git a/keyboards/1upkeyboards/sweet16/keymaps/via/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/via/keymap.c new file mode 100644 index 0000000000..bd3466814a --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_7, KC_8, KC_9, KC_ASTR, + KC_4, KC_5, KC_6, KC_SLSH, + KC_1, KC_2, KC_3, KC_MINS, + KC_0, KC_ENT, KC_DOT, MO(1) + ), + + [1] = LAYOUT_ortho_4x4( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; + + + + diff --git a/keyboards/1upkeyboards/sweet16/keymaps/via/rules.mk b/keyboards/1upkeyboards/sweet16/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 56fd16650c..5264ef698b 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x2010 +#define PRODUCT_ID 0x0161 #define DEVICE_VER 0x0001 /* key matrix pins */ diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h index bd50b69608..d344b0750d 100644 --- a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x2011 +#define PRODUCT_ID 0x0162 #define DEVICE_VER 0x0001 /* key matrix pins */ diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h index 6f27f0b623..30abf28ee3 100644 --- a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x2011 +#define PRODUCT_ID 0x0162 #define DEVICE_VER 0x0001 /* key matrix pins */ diff --git a/keyboards/ai03/orbit_x/config.h b/keyboards/ai03/orbit_x/config.h new file mode 100644 index 0000000000..fb2ebe44f6 --- /dev/null +++ b/keyboards/ai03/orbit_x/config.h @@ -0,0 +1,175 @@ +/* +Copyright 2019 Ryota Goto + +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/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0014 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 Design Studio +#define PRODUCT OrbitX +#define DESCRIPTION High-end compact ergonomic keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 // Double the rows for split +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D7, D6, D4, F0 } +#define MATRIX_COL_PINS { E6, F6, B1, B0, C7, C6 } +#define MATRIX_ROW_PINS_RIGHT { B5, D7, B4, D4 } +#define MATRIX_COL_PINS_RIGHT { D6, B6, B1, B0, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D5 +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 2500 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/orbit_x/info.json b/keyboards/ai03/orbit_x/info.json new file mode 100644 index 0000000000..638ffec4df --- /dev/null +++ b/keyboards/ai03/orbit_x/info.json @@ -0,0 +1,61 @@ +{ + "keyboard_name": "Orbit-X", + "url": "", + "maintainer": "ai03", + "width": 13.5, + "height": 4.38, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.38}, + {"x":1, "y":0.38}, + {"x":2, "y":0.13}, + {"x":3, "y":0}, + {"x":4, "y":0.13}, + {"x":5, "y":0.25}, + {"x":7.5, "y":0.25}, + {"x":8.5, "y":0.13}, + {"x":9.5, "y":0}, + {"x":10.5, "y":0.13}, + {"x":11.5, "y":0.38}, + {"x":12.5, "y":0.38}, + {"x":0, "y":1.38}, + {"x":1, "y":1.38}, + {"x":2, "y":1.13}, + {"x":3, "y":1.0}, + {"x":4, "y":1.13}, + {"x":5, "y":1.25}, + {"x":7.5, "y":1.25}, + {"x":8.5, "y":1.13}, + {"x":9.5, "y":1.0}, + {"x":10.5, "y":1.13}, + {"x":11.5, "y":1.38}, + {"x":12.5, "y":1.38}, + {"x":0, "y":2.38}, + {"x":1, "y":2.38}, + {"x":2, "y":2.13}, + {"x":3, "y":2}, + {"x":4, "y":2.13}, + {"x":5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.13}, + {"x":9.5, "y":2}, + {"x":10.5, "y":2.13}, + {"x":11.5, "y":2.38}, + {"x":12.5, "y":2.38}, + {"x":0, "y":3.38}, + {"x":1, "y":3.38}, + {"x":2, "y":3.13}, + {"x":3, "y":3}, + {"x":4.25, "y":3.38}, + {"x":5.25, "y":3.25, "h":1.5}, + {"x":7.25, "y":3.25, "h":1.5}, + {"x":8.25, "y":3.38}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3.13}, + {"x":11.5, "y":3.38}, + {"x":12.5, "y":3.38} + ] + } + } +} diff --git a/keyboards/ai03/orbit_x/keymaps/default/keymap.c b/keyboards/ai03/orbit_x/keymaps/default/keymap.c new file mode 100644 index 0000000000..6b62d2a748 --- /dev/null +++ b/keyboards/ai03/orbit_x/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Ryota Goto + * + * 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, + _NUM, + _NAV, + _FN +}; + +/* + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + MO(3), KC_TAB, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL, KC_PSCR, MO(3) + ), + [_NUM] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_GRV, KC_SLSH, KC_LBRC, KC_LPRN, KC_MINS, KC_EQL, KC_RPRN, KC_RBRC, KC_BSLS, XXXXXXX, _______, + _______, KC_TILD, KC_QUES, KC_LCBR, XXXXXXX, KC_UNDS, KC_PLUS, XXXXXXX, KC_RCBR, KC_PIPE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_NAV] = LAYOUT( + _______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______, + _______, XXXXXXX, C(G(KC_LEFT)), XXXXXXX, C(G(KC_RGHT)), XXXXXXX, XXXXXXX, C(S(KC_TAB)), XXXXXXX, C(KC_TAB), XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN] = LAYOUT( + RESET, XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, XXXXXXX, RESET, + _______, XXXXXXX, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, + _______, XXXXXXX, KC_VOLD, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/orbit_x/keymaps/default/readme.md b/keyboards/ai03/orbit_x/keymaps/default/readme.md new file mode 100644 index 0000000000..b106c969e1 --- /dev/null +++ b/keyboards/ai03/orbit_x/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for orbit_x + +Basic keymap that works well in most cases.
\ No newline at end of file diff --git a/keyboards/ai03/orbit_x/keymaps/via/keymap.c b/keyboards/ai03/orbit_x/keymaps/via/keymap.c new file mode 100644 index 0000000000..90a8ef7663 --- /dev/null +++ b/keyboards/ai03/orbit_x/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Ryota Goto + * + * 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, + _NUM, + _NAV, + _FN +}; + +/* + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + MO(3), KC_TAB, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL, KC_PSCR, MO(3) + ), + [_NUM] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_GRV, KC_SLSH, KC_LBRC, KC_LPRN, KC_MINS, KC_EQL, KC_RPRN, KC_RBRC, KC_BSLS, XXXXXXX, _______, + _______, KC_TILD, KC_QUES, KC_LCBR, XXXXXXX, KC_UNDS, KC_PLUS, XXXXXXX, KC_RCBR, KC_PIPE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_NAV] = LAYOUT( + _______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______, + _______, XXXXXXX, C(G(KC_LEFT)), XXXXXXX, C(G(KC_RGHT)), XXXXXXX, XXXXXXX, C(S(KC_TAB)), XXXXXXX, C(KC_TAB), XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN] = LAYOUT( + RESET, XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, XXXXXXX, RESET, + _______, XXXXXXX, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, + _______, XXXXXXX, KC_VOLD, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/orbit_x/keymaps/via/readme.md b/keyboards/ai03/orbit_x/keymaps/via/readme.md new file mode 100644 index 0000000000..ec31b557d4 --- /dev/null +++ b/keyboards/ai03/orbit_x/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The via keymap for orbit_x +For use with VIA configurator only diff --git a/keyboards/ai03/orbit_x/keymaps/via/rules.mk b/keyboards/ai03/orbit_x/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/ai03/orbit_x/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/ai03/orbit_x/orbit_x.c b/keyboards/ai03/orbit_x/orbit_x.c new file mode 100644 index 0000000000..3327261add --- /dev/null +++ b/keyboards/ai03/orbit_x/orbit_x.c @@ -0,0 +1,18 @@ +/* Copyright 2019 Ryota Goto + * + * 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 "orbit_x.h" + diff --git a/keyboards/ai03/orbit_x/orbit_x.h b/keyboards/ai03/orbit_x/orbit_x.h new file mode 100644 index 0000000000..a1ae8304b2 --- /dev/null +++ b/keyboards/ai03/orbit_x/orbit_x.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ +} diff --git a/keyboards/ai03/orbit_x/readme.md b/keyboards/ai03/orbit_x/readme.md new file mode 100644 index 0000000000..80bc6bbab8 --- /dev/null +++ b/keyboards/ai03/orbit_x/readme.md @@ -0,0 +1,15 @@ +# Orbit-X + +![orbit_x](https://i.imgur.com/4z2wgsV.png) + +A compact high-end split keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: The Orbit-X keyboard PCB +* Hardware Availability: Deskeys for official kit; open-source PCB [here](https://github.com/ai03-2725/Orbit/tree/master/OrbitX-PCB) + +Make example for this keyboard (after setting up your build environment): + + make ai03/orbit_x:via + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ai03/orbit_x/rules.mk b/keyboards/ai03/orbit_x/rules.mk new file mode 100644 index 0000000000..111ca910a9 --- /dev/null +++ b/keyboards/ai03/orbit_x/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +SPLIT_KEYBOARD = yes # Split keyboard
\ No newline at end of file diff --git a/keyboards/basekeys/slice/rev1/info.json b/keyboards/basekeys/slice/rev1/info.json index 705b8c386d..7f9fbe4c20 100644 --- a/keyboards/basekeys/slice/rev1/info.json +++ b/keyboards/basekeys/slice/rev1/info.json @@ -12,7 +12,7 @@ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"BS", "x":15.32, "y":0}, {"label":"BS", "x":16.32, "y":0}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, "LAYOUT_split_left_space": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4}, {"x":6.75, "y":4}, {"x":7.75, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, "LAYOUT_all": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"BS", "x":15.32, "y":0}, {"label":"BS", "x":16.32, "y":0}, {"label":"BS", "x":17.32, "y":0}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3}, {"label":"Shift", "x":15.97, "y":3}, {"label":"Shift", "x":16.97, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4}, {"x":6.75, "y":4}, {"x":7.75, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] diff --git a/keyboards/basekeys/slice/rev1_rgb/info.json b/keyboards/basekeys/slice/rev1_rgb/info.json index 47128eb765..101da97580 100644 --- a/keyboards/basekeys/slice/rev1_rgb/info.json +++ b/keyboards/basekeys/slice/rev1_rgb/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, "LAYOUT_split_left_space": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4}, {"x":6.75, "y":4}, {"x":7.75, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] } } }
\ No newline at end of file diff --git a/keyboards/bat43/bat43.c b/keyboards/bat43/bat43.c new file mode 100644 index 0000000000..5d52c672b6 --- /dev/null +++ b/keyboards/bat43/bat43.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yfuku + * + * 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 "bat43.h" diff --git a/keyboards/bat43/bat43.h b/keyboards/bat43/bat43.h new file mode 100644 index 0000000000..cf21486a9e --- /dev/null +++ b/keyboards/bat43/bat43.h @@ -0,0 +1,46 @@ +/* Copyright 2020 yfuku + * + * 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/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k33, k34, k35, k70, k71, k72, \ + k74, k75, k73, k31, k32 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 }, \ +} diff --git a/keyboards/bat43/config.h b/keyboards/bat43/config.h new file mode 100644 index 0000000000..57d65233c7 --- /dev/null +++ b/keyboards/bat43/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2020 yfuku + +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/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1070 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT bat43 +#define DESCRIPTION 43key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { E6, D7, C6, D4, F7, F6, F5, F4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, B5, B4 } +// #define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +// #define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bat43/keymaps/default/keymap.c b/keyboards/bat43/keymaps/default/keymap.c new file mode 100644 index 0000000000..5e4faccf98 --- /dev/null +++ b/keyboards/bat43/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 yfuku + * + * 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, + _LOWER, + _RAISE +}; + +#define L_SPC LT(_LOWER, KC_SPC) +#define R_ENT LT(_RAISE, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL, + KC_LGUI, KC_LANG2,L_SPC, R_ENT, KC_LANG1,KC_RALT, + KC_A, KC_B, KC_C, KC_D, KC_E + ), + [_LOWER] = LAYOUT( + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EQL, KC_PLUS, KC_ASTR, KC_PERC, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, KC_DEL, _______, _______, + _______, _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT( + _______, KC_BSLS, KC_EXLM, KC_AMPR, KC_PIPE, XXXXXXX, XXXXXXX, KC_EQL, KC_PLUS, KC_ASTR, KC_PERC, _______, + _______, KC_HASH, KC_GRV, KC_DQT, KC_QUOT, KC_TILD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DLR, _______, + _______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, KC_CIRC, _______, + _______, _______, KC_BSPC, _______, _______, _______, + _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/bat43/keymaps/default/readme.md b/keyboards/bat43/keymaps/default/readme.md new file mode 100644 index 0000000000..f72376d89e --- /dev/null +++ b/keyboards/bat43/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bat43 diff --git a/keyboards/bat43/readme.md b/keyboards/bat43/readme.md new file mode 100644 index 0000000000..7097aa7af5 --- /dev/null +++ b/keyboards/bat43/readme.md @@ -0,0 +1,15 @@ +# bat43 + +![bat43](https://user-images.githubusercontent.com/30647434/78112239-e9ef8300-7438-11ea-810b-994a75ffa24e.jpg) + +A 43-key keyboard. + +* Keyboard Maintainer: [yfuku](https://github.com/yfuku) +* Hardware Supported: bat43 PCB, Pro Micro +* Hardware Availability: https://yfuku.booth.pm/ + +Make example for this keyboard (after setting up your build environment): + + make bat43:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bat43/rules.mk b/keyboards/bat43/rules.mk new file mode 100644 index 0000000000..70400b5d0d --- /dev/null +++ b/keyboards/bat43/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json index ef327b8df9..61cab52cfd 100644 --- a/keyboards/bear_face/info.json +++ b/keyboards/bear_face/info.json @@ -3,10 +3,17 @@ "url": "https://github.com/chemicalwill/bear_face_pcb", "maintainer": "chemicalwill", "width": 16, - "height": 28, + "height": 5, "layouts": { "LAYOUT_83_ansi": { - "layout": [{"label":"Esc", "x":0, "y":1, "w":1.5}, {"label":"F1", "x":1.5, "y":1}, {"label":"F2", "x":2.5, "y":1}, {"label":"F3", "x":3.5, "y":1}, {"label":"F4", "x":4.5, "y":1}, {"label":"F5", "x":5.5, "y":1}, {"label":"F6", "x":6.5, "y":1}, {"label":"F7", "x":7.5, "y":1}, {"label":"F8", "x":8.5, "y":1}, {"label":"F9", "x":9.5, "y":1}, {"label":"F10", "x":10.5, "y":1}, {"label":"F11", "x":11.5, "y":1}, {"label":"F12", "x":12.5, "y":1}, {"x":13.5, "y":1}, {"label":"Delete", "x":14.5, "y":1, "w":1.5}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"{", "x":11, "y":2}, {"label":"}", "x":12, "y":2}, {"label":"Backspace", "x":13, "y":2, "w":2}, {"label":"Home", "x":15, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"Pg Up", "x":15, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"label":"Enter", "x":12.75, "y":4, "w":2.25}, {"label":"Pg Dn", "x":15, "y":4}, {"label":"Shift", "x":0, "y":5, "w":2.25}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14, "y":5}, {"label":"End", "x":15, "y":5}, {"label":"Ctrl", "x":0, "y":6, "w":1.25}, {"label":"Win", "x":1.25, "y":6, "w":1.25}, {"label":"Alt", "x":2.5, "y":6, "w":1.25}, {"x":3.75, "y":6, "w":6.25}, {"label":"Alt", "x":10, "y":6}, {"label":"Fn", "x":11, "y":6}, {"label":"Ctrl", "x":12, "y":6}, {"label":"\u2190", "x":13, "y":6}, {"label":"\u2193", "x":14, "y":6}, {"label":"\u2192", "x":15, "y":6}, {"label":"Esc", "x":0, "y":8, "w":1.5}, {"label":"F1", "x":1.5, "y":8}, {"label":"F2", "x":2.5, "y":8}, {"label":"F3", "x":3.5, "y":8}, {"label":"F4", "x":4.5, "y":8}, {"label":"F5", "x":5.5, "y":8}, {"label":"F6", "x":6.5, "y":8}, {"label":"F7", "x":7.5, "y":8}, {"label":"F8", "x":8.5, "y":8}, {"label":"F9", "x":9.5, "y":8}, {"label":"F10", "x":10.5, "y":8}, {"label":"F11", "x":11.5, "y":8}, {"label":"F12", "x":12.5, "y":8}, {"x":13.5, "y":8}, {"label":"Delete", "x":14.5, "y":8, "w":1.5}, {"label":"~", "x":0, "y":9}, {"label":"!", "x":1, "y":9}, {"label":"@", "x":2, "y":9}, {"label":"#", "x":3, "y":9}, {"label":"$", "x":4, "y":9}, {"label":"%", "x":5, "y":9}, {"label":"^", "x":6, "y":9}, {"label":"&", "x":7, "y":9}, {"label":"*", "x":8, "y":9}, {"label":"(", "x":9, "y":9}, {"label":")", "x":10, "y":9}, {"label":"_", "x":11, "y":9}, {"label":"+", "x":12, "y":9}, {"label":"Backspace", "x":13, "y":9, "w":2}, {"label":"Home", "x":15, "y":9}, {"label":"Tab", "x":0, "y":10, "w":1.5}, {"label":"Q", "x":1.5, "y":10}, {"label":"W", "x":2.5, "y":10}, {"label":"F", "x":3.5, "y":10}, {"label":"P", "x":4.5, "y":10}, {"label":"G", "x":5.5, "y":10}, {"label":"J", "x":6.5, "y":10}, {"label":"L", "x":7.5, "y":10}, {"label":"U", "x":8.5, "y":10}, {"label":"Y", "x":9.5, "y":10}, {"label":":", "x":10.5, "y":10}, {"label":"{", "x":11.5, "y":10}, {"label":"}", "x":12.5, "y":10}, {"label":"|", "x":13.5, "y":10, "w":1.5}, {"label":"Pg Up", "x":15, "y":10}, {"label":"Backspace", "x":0, "y":11, "w":1.75}, {"label":"A", "x":1.75, "y":11}, {"label":"R", "x":2.75, "y":11}, {"label":"S", "x":3.75, "y":11}, {"label":"T", "x":4.75, "y":11}, {"label":"D", "x":5.75, "y":11}, {"label":"H", "x":6.75, "y":11}, {"label":"N", "x":7.75, "y":11}, {"label":"E", "x":8.75, "y":11}, {"label":"I", "x":9.75, "y":11}, {"label":"O", "x":10.75, "y":11}, {"label":"\"", "x":11.75, "y":11}, {"label":"Enter", "x":12.75, "y":11, "w":2.25}, {"label":"Pg Dn", "x":15, "y":11}, {"label":"Shift", "x":0, "y":12, "w":2.25}, {"label":"Z", "x":2.25, "y":12}, {"label":"X", "x":3.25, "y":12}, {"label":"C", "x":4.25, "y":12}, {"label":"V", "x":5.25, "y":12}, {"label":"B", "x":6.25, "y":12}, {"label":"K", "x":7.25, "y":12}, {"label":"M", "x":8.25, "y":12}, {"label":"<", "x":9.25, "y":12}, {"label":">", "x":10.25, "y":12}, {"label":"?", "x":11.25, "y":12}, {"label":"Shift", "x":12.25, "y":12, "w":1.75}, {"label":"\u2191", "x":14, "y":12}, {"label":"End", "x":15, "y":12}, {"label":"Ctrl", "x":0, "y":13, "w":1.25}, {"label":"Win", "x":1.25, "y":13, "w":1.25}, {"label":"Alt", "x":2.5, "y":13, "w":1.25}, {"x":3.75, "y":13, "w":6.25}, {"label":"Alt", "x":10, "y":13}, {"label":"Fn", "x":11, "y":13}, {"label":"Ctrl", "x":12, "y":13}, {"label":"\u2190", "x":13, "y":13}, {"label":"\u2193", "x":14, "y":13}, {"label":"\u2192", "x":15, "y":13}, {"label":"Esc", "x":0, "y":15, "w":1.5}, {"label":"F1", "x":1.5, "y":15}, {"label":"F2", "x":2.5, "y":15}, {"label":"F3", "x":3.5, "y":15}, {"label":"F4", "x":4.5, "y":15}, {"label":"F5", "x":5.5, "y":15}, {"label":"F6", "x":6.5, "y":15}, {"label":"F7", "x":7.5, "y":15}, {"label":"F8", "x":8.5, "y":15}, {"label":"F9", "x":9.5, "y":15}, {"label":"F10", "x":10.5, "y":15}, {"label":"F11", "x":11.5, "y":15}, {"label":"F12", "x":12.5, "y":15}, {"x":13.5, "y":15}, {"label":"Delete", "x":14.5, "y":15, "w":1.5}, {"label":"~", "x":0, "y":16}, {"label":"!", "x":1, "y":16}, {"label":"@", "x":2, "y":16}, {"label":"#", "x":3, "y":16}, {"label":"$", "x":4, "y":16}, {"label":"%", "x":5, "y":16}, {"label":"^", "x":6, "y":16}, {"label":"&", "x":7, "y":16}, {"label":"*", "x":8, "y":16}, {"label":"(", "x":9, "y":16}, {"label":")", "x":10, "y":16}, {"label":"{", "x":11, "y":16}, {"label":"}", "x":12, "y":16}, {"label":"Backspace", "x":13, "y":16, "w":2}, {"label":"Home", "x":15, "y":16}, {"label":"Tab", "x":0, "y":17, "w":1.5}, {"label":"\"", "x":1.5, "y":17}, {"label":"<", "x":2.5, "y":17}, {"label":">", "x":3.5, "y":17}, {"label":"P", "x":4.5, "y":17}, {"label":"Y", "x":5.5, "y":17}, {"label":"F", "x":6.5, "y":17}, {"label":"G", "x":7.5, "y":17}, {"label":"C", "x":8.5, "y":17}, {"label":"R", "x":9.5, "y":17}, {"label":"L", "x":10.5, "y":17}, {"label":"?", "x":11.5, "y":17}, {"label":"+", "x":12.5, "y":17}, {"label":"|", "x":13.5, "y":17, "w":1.5}, {"label":"Pg Up", "x":15, "y":17}, {"label":"Caps Lock", "x":0, "y":18, "w":1.75}, {"label":"A", "x":1.75, "y":18}, {"label":"O", "x":2.75, "y":18}, {"label":"E", "x":3.75, "y":18}, {"label":"U", "x":4.75, "y":18}, {"label":"I", "x":5.75, "y":18}, {"label":"D", "x":6.75, "y":18}, {"label":"H", "x":7.75, "y":18}, {"label":"T", "x":8.75, "y":18}, {"label":"N", "x":9.75, "y":18}, {"label":"S", "x":10.75, "y":18}, {"label":"_", "x":11.75, "y":18}, {"label":"Enter", "x":12.75, "y":18, "w":2.25}, {"label":"Pg Dn", "x":15, "y":18}, {"label":"Shift", "x":0, "y":19, "w":2.25}, {"label":":", "x":2.25, "y":19}, {"label":"Q", "x":3.25, "y":19}, {"label":"J", "x":4.25, "y":19}, {"label":"K", "x":5.25, "y":19}, {"label":"X", "x":6.25, "y":19}, {"label":"B", "x":7.25, "y":19}, {"label":"M", "x":8.25, "y":19}, {"label":"W", "x":9.25, "y":19}, {"label":"V", "x":10.25, "y":19}, {"label":"Z", "x":11.25, "y":19}, {"label":"Shift", "x":12.25, "y":19, "w":1.75}, {"label":"\u2191", "x":14, "y":19}, {"label":"End", "x":15, "y":19}, {"label":"Ctrl", "x":0, "y":20, "w":1.25}, {"label":"Win", "x":1.25, "y":20, "w":1.25}, {"label":"Alt", "x":2.5, "y":20, "w":1.25}, {"x":3.75, "y":20, "w":6.25}, {"label":"Alt", "x":10, "y":20}, {"label":"Fn", "x":11, "y":20}, {"label":"Ctrl", "x":12, "y":20}, {"label":"\u2190", "x":13, "y":20}, {"label":"\u2193", "x":14, "y":20}, {"label":"\u2192", "x":15, "y":20}, {"x":0, "y":22, "w":1.5}, {"label":"Mute", "x":1.5, "y":22}, {"label":"Vol Dn", "x":2.5, "y":22}, {"label":"Vol Up", "x":3.5, "y":22}, {"label":"Prev", "x":4.5, "y":22}, {"label":"Play", "x":5.5, "y":22}, {"label":"Next", "x":6.5, "y":22}, {"x":7.5, "y":22}, {"x":8.5, "y":22}, {"label":"Print Screen", "x":9.5, "y":22}, {"label":"Scroll Lock", "x":10.5, "y":22}, {"label":"Pause", "x":11.5, "y":22}, {"x":12.5, "y":22}, {"x":13.5, "y":22}, {"label":"Insert", "x":14.5, "y":22, "w":1.5}, {"x":0, "y":23}, {"x":1, "y":23}, {"x":2, "y":23}, {"x":3, "y":23}, {"x":4, "y":23}, {"x":5, "y":23}, {"x":6, "y":23}, {"x":7, "y":23}, {"x":8, "y":23}, {"x":9, "y":23}, {"x":10, "y":23}, {"x":11, "y":23}, {"x":12, "y":23}, {"label":"Calculator", "x":13, "y":23, "w":2}, {"label":"Qwer", "x":15, "y":23}, {"x":0, "y":24, "w":1.5}, {"x":1.5, "y":24}, {"x":2.5, "y":24}, {"x":3.5, "y":24}, {"label":"Reset", "x":4.5, "y":24}, {"x":5.5, "y":24}, {"x":6.5, "y":24}, {"x":7.5, "y":24}, {"x":8.5, "y":24}, {"label":"Reset", "x":9.5, "y":24}, {"x":10.5, "y":24}, {"x":11.5, "y":24}, {"x":12.5, "y":24}, {"x":13.5, "y":24, "w":1.5}, {"label":"Cole", "x":15, "y":24}, {"x":0, "y":25, "w":1.75}, {"x":1.75, "y":25}, {"label":"Reset", "x":2.75, "y":25}, {"x":3.75, "y":25}, {"x":4.75, "y":25}, {"x":5.75, "y":25}, {"x":6.75, "y":25}, {"x":7.75, "y":25}, {"x":8.75, "y":25}, {"x":9.75, "y":25}, {"x":10.75, "y":25}, {"x":11.75, "y":25}, {"x":12.75, "y":25, "w":2.25}, {"label":"Dvor", "x":15, "y":25}, {"x":0, "y":26, "w":2.25}, {"label":"App", "x":2.25, "y":26}, {"x":3.25, "y":26}, {"x":4.25, "y":26}, {"x":5.25, "y":26}, {"x":6.25, "y":26}, {"x":7.25, "y":26}, {"x":8.25, "y":26}, {"x":9.25, "y":26}, {"x":10.25, "y":26}, {"label":"App", "x":11.25, "y":26}, {"x":12.25, "y":26, "w":1.75}, {"x":14, "y":26}, {"x":15, "y":26}, {"x":0, "y":27, "w":1.25}, {"x":1.25, "y":27, "w":1.25}, {"x":2.5, "y":27, "w":1.25}, {"x":3.75, "y":27, "w":6.25}, {"x":10, "y":27}, {"x":11, "y":27}, {"x":12, "y":27}, {"x":13, "y":27}, {"x":14, "y":27}, {"x":15, "y":27}] + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.5, "y":0}, {"label":"F10", "x":10.5, "y":0}, {"label":"F11", "x":11.5, "y":0}, {"label":"F12", "x":12.5, "y":0}, {"label":"Pn", "x":13.5, "y":0}, {"label":"Delete", "x":14.5, "y":0, "w":1.5}, + {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"{", "x":11, "y":1}, {"label":"}", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Pg Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Pg Dn", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Up", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"Left", "x":13, "y":5}, {"label":"Down", "x":14, "y":5}, {"label":"Right", "x":15, "y":5} + ] } } } diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c new file mode 100644 index 0000000000..3d6de56f22 --- /dev/null +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -0,0 +1,118 @@ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum centromere_layers +{ + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines for layer movement +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Defines for task manager +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | Ctrl | LOWER| | | | RAISE| Shift| + * `-------------| Space| |BckSpc|------+------. + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT( + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, + KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = LAYOUT( + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_NO, KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, + KC_NO, KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, KC_NO, + _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| Del | + * `-------------| | | Enter|------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = LAYOUT( + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + KC_NO, KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, + KC_NO, KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, KC_NO, + _______, _______, _______, KC_ENT, _______, KC_DEL +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | | | | | | | |Taskmg|caltde| + * |------+------+------+------+------| |------+------+------+------+------| + * | Reset| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = LAYOUT( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, + KC_NO, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, KC_NO, + KC_NO, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, + _______, _______, _______, _______, _______, _______ +) +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h index 0a005ab0dd..5d24309080 100644 --- a/keyboards/coseyfannitutti/discipline/config.h +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x6B62 #define PRODUCT_ID 0x6869 #define DEVICE_VER 0x0001 #define MANUFACTURER coseyfannitutti diff --git a/keyboards/coseyfannitutti/discipline/discipline.h b/keyboards/coseyfannitutti/discipline/discipline.h index 1703a61284..3369d7efb4 100644 --- a/keyboards/coseyfannitutti/discipline/discipline.h +++ b/keyboards/coseyfannitutti/discipline/discipline.h @@ -76,3 +76,58 @@ { K40, _x_, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ } +#define LAYOUT_65_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} + +#define LAYOUT_65_iso_2_right_mods( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ +} + +#define LAYOUT_wkl_iso_2_right_mods( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K42, K46, K49, K4A, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, _x_, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ +} + +#define LAYOUT_wkl_iso_3_right_mods( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, _x_, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} diff --git a/keyboards/coseyfannitutti/discipline/info.json b/keyboards/coseyfannitutti/discipline/info.json index 522e800678..8082898241 100644 --- a/keyboards/coseyfannitutti/discipline/info.json +++ b/keyboards/coseyfannitutti/discipline/info.json @@ -16,6 +16,18 @@ }, "LAYOUT_wkl_ansi_3_right_mods": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"~", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_65_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_65_iso_2_right_mods": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_wkl_iso_2_right_mods": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"x":10, "y":4, "w":1.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_wkl_iso_3_right_mods": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c deleted file mode 100644 index 34410d54af..0000000000 --- a/keyboards/coseyfannitutti/discipline/keymaps/67_ansi/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright 2019 COSEYFANNITUTTI - * - * 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 - -#define _BL 0 -#define _FL 1 - - /* Qwerty - * .---------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | - * |---------------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | - * |---------------------------------------------------------------------------------------------+ - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| - * |---------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | Space | RAlt | FN ||||||| L | D | R | - * '---------------------------------------------------------------------------------------------' - */ - - /* FnLayer - * .---------------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| - * |---------------------------------------------------------------------------------------------+ - * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | - * |---------------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | INS | Enter | HOME| - * |---------------------------------------------------------------------------------------------+ - * | Shift | | | | | | | | | | | Shift |VOLUP| END | - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | | RAlt| FN ||||||| L |VOLDN| R | - * '---------------------------------------------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_65_ansi_2_right_mods( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), - - [_FL] = LAYOUT_65_ansi_2_right_mods( - /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, - /* tab Q W E R T Y U I O P [ ] \ delete*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, - /* caps A S D F G H J K L ; ' enter pg up*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, - /* shift Z X C V B N M , . / shift up pg dn*/ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, - /* ctrl win alt space alt fn ctrl left down right*/ - KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) -}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c deleted file mode 100644 index cb14d23f10..0000000000 --- a/keyboards/coseyfannitutti/discipline/keymaps/coseyfannitutti/keymap.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright 2019 COSEYFANNITUTTI - * - * 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 - -#define _BL 0 -#define _FL 1 - - /* Qwerty - * .---------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | - * |---------------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | - * |---------------------------------------------------------------------------------------------+ - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| - * |---------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | Space | RAlt | FN ||||||| L | D | R | - * '---------------------------------------------------------------------------------------------' - */ - - /* FnLayer - * .---------------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| - * |---------------------------------------------------------------------------------------------+ - * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | - * |---------------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | INS | Enter | HOME| - * |---------------------------------------------------------------------------------------------+ - * | Shift | | | | | | | | | | | Shift |VOLUP| END | - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | | RAlt| FN ||||||| L |VOLDN| R | - * '---------------------------------------------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_65_ansi_2_right_mods( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FL), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), - - [_FL] = LAYOUT_65_ansi_2_right_mods( - /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, - /* tab Q W E R T Y U I O P [ ] \ delete*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, - /* caps A S D F G H J K L ; ' enter pg up*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, - /* shift Z X C V B N M , . / shift up pg dn*/ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, - /* ctrl win alt space alt fn left down right*/ - KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) -}; - diff --git a/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c index da433c1a6b..1fdfce67ea 100644 --- a/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c +++ b/keyboards/coseyfannitutti/discipline/keymaps/default/keymap.c @@ -15,46 +15,15 @@ */ #include QMK_KEYBOARD_H -#define _BL 0 -#define _FL 1 - - /* Qwerty - * .---------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | - * |---------------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | - * |---------------------------------------------------------------------------------------------+ - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| - * |---------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | Space | RAlt | FN |RCtrl| L | D | R | - * '---------------------------------------------------------------------------------------------' - */ - - /* FnLayer - * .---------------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| - * |---------------------------------------------------------------------------------------------+ - * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | - * |---------------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | INS | Enter | HOME| - * |---------------------------------------------------------------------------------------------+ - * | Shift | | | | | | | | | | | Shift |VOLUP| END | - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Win | Alt | | RAlt| FN |RCtrl| L |VOLDN| R | - * '---------------------------------------------------------------------------------------------' - */ - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_65_ansi( + [0] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [_FL] = LAYOUT_65_ansi( + [1] = LAYOUT_65_ansi( /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, /* tab Q W E R T Y U I O P [ ] \ delete*/ diff --git a/keyboards/coseyfannitutti/discipline/keymaps/iso/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/iso/keymap.c new file mode 100644 index 0000000000..7f4c240378 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/iso/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_65_iso( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' # enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME, + /* shift \ Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/via/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/via/keymap.c new file mode 100644 index 0000000000..365b06dbf0 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/via/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSLS, KC_PGUP, + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_65_iso( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS), + + [2] = LAYOUT_65_iso( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_65_iso( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk new file mode 100644 index 0000000000..d0e4977b84 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c deleted file mode 100644 index 01b1e21f11..0000000000 --- a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_2_right_mods/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright 2019 COSEYFANNITUTTI - * - * 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 - -#define _BL 0 -#define _FL 1 - - /* Qwerty - * .---------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | - * |---------------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | - * |---------------------------------------------------------------------------------------------+ - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| - * |---------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Space | RAlt | FN | L | D | R | - * '---------------------------------------------------------------------------------------------' - */ - - /* FnLayer - * .---------------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| - * |---------------------------------------------------------------------------------------------+ - * | Tab | | | |RESET| | | | | | |PAUSE| | \ | | - * |---------------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | INS | Enter | HOME| - * |---------------------------------------------------------------------------------------------+ - * | Shift | | | | | | | | | | | Shift |VOLUP| END | - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Alt | | RAlt | FN | L |VOLDN| R | - * '---------------------------------------------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_wkl_ansi_2_right_mods( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), - - [_FL] = LAYOUT_wkl_ansi_2_right_mods( - /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, - /* tab Q W E R T Y U I O P [ ] \ delete*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, - /* caps A S D F G H J K L ; ' enter pg up*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, - /* shift Z X C V B N M , . / shift up pg dn*/ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, - /* ctrl alt space alt fn left down right*/ - KC_LCTL, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) -}; diff --git a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c deleted file mode 100644 index 05f8810e6c..0000000000 --- a/keyboards/coseyfannitutti/discipline/keymaps/wkl_ansi_3_right_mods/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright 2019 COSEYFANNITUTTI - * - * 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 - -#define _BL 0 -#define _FL 1 - - /* Qwerty - * .---------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | - * |---------------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | - * |---------------------------------------------------------------------------------------------+ - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| - * |---------------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Space | RAlt | FN |RCtrl| L | D | R | - * '---------------------------------------------------------------------------------------------' - */ - - /* FnLayer - * .---------------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| - * |---------------------------------------------------------------------------------------------+ - * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PAUSE| | \ | | - * |---------------------------------------------------------------------------------------------+ - * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | INS | Enter | HOME| - * |---------------------------------------------------------------------------------------------+ - * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VOLUP| END | - * |---------------------------------------------------------------------------------------------+ - * | Ctrl | Alt | | RAlt| FN |RCtrl| L |VOLDN| R | - * '---------------------------------------------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_wkl_ansi_3_right_mods( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - - [_FL] = LAYOUT_wkl_ansi_3_right_mods( - /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, - /* tab Q W E R T Y U I O P [ ] \ delete*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, - /* caps A S D F G H J K L ; ' enter pg up*/ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, - /* shift Z X C V B N M , . / shift up pg dn*/ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, - /* ctrl alt space alt fn ctrl left down right*/ - KC_LCTL, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS) -}; diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index ce71857a94..33a0b07ddf 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -38,4 +38,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/coseyfannitutti/romeo/config.h b/keyboards/coseyfannitutti/romeo/config.h index aa54ce250d..49226ebfaf 100644 --- a/keyboards/coseyfannitutti/romeo/config.h +++ b/keyboards/coseyfannitutti/romeo/config.h @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x6B62 #define PRODUCT_ID 0x4069 #define DEVICE_VER 0x0001 #define MANUFACTURER coseyfannitutti @@ -50,8 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define NO_UART 1 - /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ diff --git a/keyboards/coseyfannitutti/romeo/keymaps/via/keymap.c b/keyboards/coseyfannitutti/romeo/keymaps/via/keymap.c new file mode 100644 index 0000000000..951acdca5b --- /dev/null +++ b/keyboards/coseyfannitutti/romeo/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL ), + + [1] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RESET, + KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, + KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) +}; diff --git a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk new file mode 100644 index 0000000000..d0e4977b84 --- /dev/null +++ b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index e5e9b84657..73b1d2ecb9 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -25,4 +25,4 @@ BACKLIGHT_ENABLE = yes # Enable per-key backlight LEDs AUDIO_ENABLE = no # There is no speaker on this PCB RGBLIGHT_ENABLE = yes # Enable the RGB underglow LEDs -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 60_tsangan_hhkb diff --git a/keyboards/ergodox_ez/led_i2c.c b/keyboards/ergodox_ez/led_i2c.c index 4a7a02f468..7c1ccdec5a 100644 --- a/keyboards/ergodox_ez/led_i2c.c +++ b/keyboards/ergodox_ez/led_i2c.c @@ -27,19 +27,6 @@ extern rgblight_config_t rgblight_config; -/* - * Forward declare internal functions - * - * The functions take a byte-array and send to the data output as WS2812 bitstream. - * The length is the number of bytes to send - three per LED. - */ - -void ws2812_sendarray(uint8_t *array, uint16_t length); -void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask); - - - - void rgblight_set(void) { if (!rgblight_config.enable) { for (uint8_t i = 0; i < RGBLED_NUM; i++) { diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index e183f776e9..450c59020c 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h @@ -142,3 +142,17 @@ inline void gh60_wasd_leds_off(void) { setPinInput(F7); } { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } + +#define LAYOUT_60_tsangan_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D } \ +} diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk index fb9ca646f0..831de85d00 100644 --- a/keyboards/gh60/revc/rules.mk +++ b/keyboards/gh60/revc/rules.mk @@ -28,4 +28,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h index 45ef573ce0..653c0f6279 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEVICE_VER 0x0001 #define MANUFACTURER Yiancar-Designs #define PRODUCT Gingham -#define DESCRIPTION A 65 persent keyboard with only through hole components +#define DESCRIPTION A 60 percent keyboard with only through hole components /* key matrix size */ #define MATRIX_ROWS 5 @@ -240,8 +240,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - -/* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 - diff --git a/keyboards/gingham/keymaps/default/keymap.c b/keyboards/gingham/keymaps/default/keymap.c index b5b4de5fff..f54d6d8bdc 100644 --- a/keyboards/gingham/keymaps/default/keymap.c +++ b/keyboards/gingham/keymaps/default/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi_split_bs_rshift( /* Base */ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), @@ -46,15 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -}
\ No newline at end of file diff --git a/keyboards/gingham/keymaps/iso/keymap.c b/keyboards/gingham/keymaps/iso/keymap.c index 0058df54ac..6aae0ccf36 100644 --- a/keyboards/gingham/keymaps/iso/keymap.c +++ b/keyboards/gingham/keymaps/iso/keymap.c @@ -20,41 +20,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_iso_split_bs_rshift( /* Base */ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_iso_split_bs_rshift( /* FN */ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [3] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -}
\ No newline at end of file diff --git a/keyboards/gingham/keymaps/via/keymap.c b/keyboards/gingham/keymaps/via/keymap.c new file mode 100644 index 0000000000..3f7f1c4229 --- /dev/null +++ b/keyboards/gingham/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2018 Yiancar + * + * 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 + +// This keymaps is used for VIA, it reflects the default keymap. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso_split_bs_rshift( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso_split_bs_rshift( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/gingham/keymaps/via/readme.md b/keyboards/gingham/keymaps/via/readme.md new file mode 100644 index 0000000000..a49e2c0568 --- /dev/null +++ b/keyboards/gingham/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Compile with this keymap to use VIA + +Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/keyboards/gingham/keymaps/via/rules.mk b/keyboards/gingham/keymaps/via/rules.mk new file mode 100644 index 0000000000..930e3552ad --- /dev/null +++ b/keyboards/gingham/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/hhkb/hhkb.h b/keyboards/hhkb/hhkb.h index 30dc039a4c..668f78eecc 100644 --- a/keyboards/hhkb/hhkb.h +++ b/keyboards/hhkb/hhkb.h @@ -21,6 +21,7 @@ { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ } +#define LAYOUT_60_hhkb LAYOUT #define LAYOUT_JP( \ K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index fb1538d8ac..68fb51a30c 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -67,3 +67,5 @@ endif # debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT # debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) # debug-off: all + +LAYOUTS = 60_hhkb diff --git a/keyboards/lattice60/config.h b/keyboards/lattice60/config.h new file mode 100644 index 0000000000..e864eeebb3 --- /dev/null +++ b/keyboards/lattice60/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2019 Ethan Durrant (emdarcher) + +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/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x16C0 +#define PRODUCT_ID 0x27DB +#define DEVICE_VER 0x0001 +#define MANUFACTURER emdarcher +#define PRODUCT LATTICE60 +#define DESCRIPTION A HHKB layout keyboard using only through-hole components. + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B2, B3, B4, B5, C0, C1, C2, C3 } +#define MATRIX_COL_PINS { D7, D6, B0, D5, D1, D4, D0, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif diff --git a/keyboards/lattice60/info.json b/keyboards/lattice60/info.json new file mode 100644 index 0000000000..fd738945d4 --- /dev/null +++ b/keyboards/lattice60/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "lattice60", + "url": "", + "maintainer": "emdarcher", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4}, {"x":5, "y":4, "w":2.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4} + ] + }, + "LAYOUT_60_hhkb": { + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4} + ] + } + } +} diff --git a/keyboards/lattice60/keymaps/default/config.h b/keyboards/lattice60/keymaps/default/config.h new file mode 100644 index 0000000000..88d9334765 --- /dev/null +++ b/keyboards/lattice60/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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/>. + */ + +#pragma once + +// place overrides here +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/lattice60/keymaps/default/keymap.c b/keyboards/lattice60/keymaps/default/keymap.c new file mode 100644 index 0000000000..a5102070ea --- /dev/null +++ b/keyboards/lattice60/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT + ), + [_FN] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/lattice60/keymaps/default/readme.md b/keyboards/lattice60/keymaps/default/readme.md new file mode 100644 index 0000000000..bde2ba9b41 --- /dev/null +++ b/keyboards/lattice60/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for lattice60 + +![layout](https://i.imgur.com/aW6PpmX.png) + +This keymap uses a default HHKB layout, with support for a split spacebar and the addition of GESC on the ESC key. diff --git a/keyboards/lattice60/keymaps/default_hhkb/config.h b/keyboards/lattice60/keymaps/default_hhkb/config.h new file mode 100644 index 0000000000..88d9334765 --- /dev/null +++ b/keyboards/lattice60/keymaps/default_hhkb/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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/>. + */ + +#pragma once + +// place overrides here +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/lattice60/keymaps/default_hhkb/keymap.c b/keyboards/lattice60/keymaps/default_hhkb/keymap.c new file mode 100644 index 0000000000..ccdc10ab32 --- /dev/null +++ b/keyboards/lattice60/keymaps/default_hhkb/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_60_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT + ), + [_FN] = LAYOUT_60_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/lattice60/keymaps/default_hhkb/readme.md b/keyboards/lattice60/keymaps/default_hhkb/readme.md new file mode 100644 index 0000000000..734ba74b9e --- /dev/null +++ b/keyboards/lattice60/keymaps/default_hhkb/readme.md @@ -0,0 +1,5 @@ +# The default HHKB keymap for lattice60 + +![layout](https://i.imgur.com/aW6PpmX.png) + +This keymap uses a default HHKB layout, with the addition of GESC on the ESC key. diff --git a/keyboards/lattice60/keymaps/emdarcher/config.h b/keyboards/lattice60/keymaps/emdarcher/config.h new file mode 100644 index 0000000000..88d9334765 --- /dev/null +++ b/keyboards/lattice60/keymaps/emdarcher/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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/>. + */ + +#pragma once + +// place overrides here +#define GRAVE_ESC_ALT_OVERRIDE diff --git a/keyboards/lattice60/keymaps/emdarcher/keymap.c b/keyboards/lattice60/keymaps/emdarcher/keymap.c new file mode 100644 index 0000000000..099e8e9203 --- /dev/null +++ b/keyboards/lattice60/keymaps/emdarcher/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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, + _FN0, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_60_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN0), + KC_LALT, KC_LGUI, /* */ KC_SPC, MO(_FN1), KC_RALT + ), + [_FN0] = LAYOUT_60_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_FN1] = LAYOUT_60_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MFFD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/lattice60/keymaps/emdarcher/readme.md b/keyboards/lattice60/keymaps/emdarcher/readme.md new file mode 100644 index 0000000000..812351af48 --- /dev/null +++ b/keyboards/lattice60/keymaps/emdarcher/readme.md @@ -0,0 +1,5 @@ +# emdarcher's keymap for lattice60 + +![layout](https://i.imgur.com/9g3fDqL.png) + +Modified function layer from the default HHKB functions, and added an extra layer for media controls. diff --git a/keyboards/lattice60/lattice60.c b/keyboards/lattice60/lattice60.c new file mode 100644 index 0000000000..6cc0ea42fb --- /dev/null +++ b/keyboards/lattice60/lattice60.c @@ -0,0 +1,37 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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 "lattice60.h" + +#define LED1_PIN C4 +#define LED2_PIN C5 + +void keyboard_pre_init_kb(void){ + //init the LED pins as outputs + setPinOutput(LED1_PIN); + setPinOutput(LED2_PIN); + //call any user initialization code + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res){ + //write the CAPS LOCK state on LED1 + writePin(LED1_PIN, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/lattice60/lattice60.h b/keyboards/lattice60/lattice60.h new file mode 100644 index 0000000000..d9f5f37dea --- /dev/null +++ b/keyboards/lattice60/lattice60.h @@ -0,0 +1,64 @@ +/* Copyright 2019 Ethan Durrant (emdarcher) + * + * 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/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k04, k10, k14, k20, k24, k30, k34, k40, k44, k50, k54, k60, k64, k65, \ + k01, k05, k11, k15, k21, k25, k31, k35, k41, k45, k51, k55, k61, k66, \ + k02, k06, k12, k16, k22, k26, k32, k36, k42, k46, k52, k56, k62, \ + k03, k07, k13, k17, k23, k27, k37, k43, k47, k53, k57, k63, k67, \ + k70, k71, k72, k33, k74, k75, k76, k77 \ +) \ +{ \ + { k00, k10, k20, k30, k40, k50, k60, k70 }, \ + { k01, k11, k21, k31, k41, k51, k61, k71 }, \ + { k02, k12, k22, k32, k42, k52, k62, k72 }, \ + { k03, k13, k23, k33, k43, k53, k63, KC_NO }, \ + { k04, k14, k24, k34, k44, k54, k64, k74 }, \ + { k05, k15, k25, k35, k45, k55, k65, k75 }, \ + { k06, k16, k26, k36, k46, k56, k66, k76 }, \ + { k07, k17, k27, k37, k47, k57, k67, k77 } \ +} + + +#define LAYOUT_60_hhkb( \ + k00, k04, k10, k14, k20, k24, k30, k34, k40, k44, k50, k54, k60, k64, k65, \ + k01, k05, k11, k15, k21, k25, k31, k35, k41, k45, k51, k55, k61, k66, \ + k02, k06, k12, k16, k22, k26, k32, k36, k42, k46, k52, k56, k62, \ + k03, k07, k13, k17, k23, k27, k37, k43, k47, k53, k57, k63, k67, \ + k70, k71, k33, k76, k77 \ +) \ +{ \ + { k00, k10, k20, k30, k40, k50, k60, k70 }, \ + { k01, k11, k21, k31, k41, k51, k61, k71 }, \ + { k02, k12, k22, k32, k42, k52, k62, KC_NO }, \ + { k03, k13, k23, k33, k43, k53, k63, KC_NO }, \ + { k04, k14, k24, k34, k44, k54, k64, KC_NO }, \ + { k05, k15, k25, k35, k45, k55, k65, KC_NO }, \ + { k06, k16, k26, k36, k46, k56, k66, k76 }, \ + { k07, k17, k27, k37, k47, k57, k67, k77 } \ +} diff --git a/keyboards/lattice60/readme.md b/keyboards/lattice60/readme.md new file mode 100644 index 0000000000..f5a3dc5942 --- /dev/null +++ b/keyboards/lattice60/readme.md @@ -0,0 +1,21 @@ +# lattice60 + +![lattice60](https://i.imgur.com/1TdrWii.jpg) + +A HHKB layout keyboard using only through-hole components. + +* Keyboard Maintainer: [emdarcher](https://github.com/emdarcher) +* Hardware Supported: LATTICE60 PCB +* Hardware Availability: [KeyHive](https://keyhive.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make lattice60:default + +To activate the USBasploader bootloader, hold the BOOT button down during power on or reset. LED2 should light up to indicate that the bootloader is active. + +Flash the firmware using the `make` command with the `flash` parameter, example below: + + make lattice60:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/lattice60/rules.mk b/keyboards/lattice60/rules.mk new file mode 100644 index 0000000000..2a1a529660 --- /dev/null +++ b/keyboards/lattice60/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Processor frequency +F_CPU = 12000000 + +# disable the debugging code +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = 60_hhkb diff --git a/keyboards/plaid/keymaps/via/config.h b/keyboards/plaid/keymaps/via/config.h new file mode 100644 index 0000000000..4c84c55b84 --- /dev/null +++ b/keyboards/plaid/keymaps/via/config.h @@ -0,0 +1,6 @@ +// These VID/PID is not verified. Use at your own risk. +#undef VENDOR_ID +#undef PRODUCT_ID + +#define VENDOR_ID 0x0d39 +#define PRODUCT_ID 0x0001 diff --git a/keyboards/plaid/keymaps/via/keymap.c b/keyboards/plaid/keymaps/via/keymap.c new file mode 100644 index 0000000000..7bb28c07ed --- /dev/null +++ b/keyboards/plaid/keymaps/via/keymap.c @@ -0,0 +1,101 @@ +/* Copyright 2020 Takuya Urakawa (dm9records.com) + * + * 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 + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_plaid_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[1] = LAYOUT_plaid_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | DEL | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[2] = LAYOUT_plaid_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[3] = LAYOUT_plaid_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; +bool led_update_user(led_t led_state) { + writePin(LED_RED, led_state.caps_lock); + writePin(LED_GREEN, led_state.scroll_lock); + return false; +} diff --git a/keyboards/plaid/keymaps/via/readme.md b/keyboards/plaid/keymaps/via/readme.md new file mode 100644 index 0000000000..28dd672111 --- /dev/null +++ b/keyboards/plaid/keymaps/via/readme.md @@ -0,0 +1,8 @@ +# The via keymap for plaid + +This is an experimental. Use at your own risk. + +Layer3 is activated when Layer1 and 2 are both on. + +LED RED : CAPSLOCK +LED GREEN : SCROLLLOCK diff --git a/keyboards/plaid/keymaps/via/rules.mk b/keyboards/plaid/keymaps/via/rules.mk new file mode 100644 index 0000000000..930e3552ad --- /dev/null +++ b/keyboards/plaid/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c index 687a0f28d7..b4b983d9c0 100644 --- a/keyboards/planck/keymaps/sigul/keymap.c +++ b/keyboards/planck/keymaps/sigul/keymap.c @@ -4,10 +4,10 @@ * Version 0.3 * * Created by Silvio Gulizia on the basis of the default Planck keymap. - * thanks to SomeBuddyOnReddit, gepeirl, fauxpark, BXO511, drashna, ridingqwerty ... + * Thanks to SomeBuddyOnReddit, gepeirl, fauxpark, BXO511, drashna, and ridingqwerty. * - * based on the original Planck layout - * Italian accented vowels "" and "à" have been moved from the QWERTY layer to the LOWER layers, while "è" and "ù" remain respectively on RAISE and LOWER. + * The layout is based on the original Planck layout when used with language set to Italian on your Mac. + * Accented vowels have been moverd on RAISE ("", "", and "") and LOWER ("", "", and "") * */ @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * |Esc/FN| A | S | D | F | G | H | J | K | L | ;: | '" | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | FN/B | N | M | ,< | .> | /! |S/Ent | + * | Shift| Z | X | C | V | MS/B | N | M | ,< | .> | /! |S/Ent | * |------+------+------+------+------+------+------+------+------+------+------+------| * | FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' @@ -37,13 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower - * added ò and à that were on the default Planck Querty layer when used with a device with lang set to Italian * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | _ | = | é | ò | à | + * | | F1 | F2 | F3 | F4 | F5 | | _ | = | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F6 | F7 | F8 | F9 | MOUSE|NUMPAD| § | ± | { | } | | | + * | | F6 | F7 | F8 | F9 | |NUMPAD| | | { | } | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -52,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_ortho_4x12( IT_TILDE, IT_EXLM, IT_AT, IT_SHRP, IT_DLR, IT_PERC, IT_CRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC, - _______, KC_F6, KC_F7, KC_F8, KC_F9, MOUSE, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, + _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -60,9 +59,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | SGCOM| DESK | | | | - | + | è | ì | ù | + * | | | SGCOM| DESK | | | | - | + | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Caps | | PHONE| SVIV |VIVERE|MOUSE |NUMPAD| | | [ | ] | \ | + * | Caps | | PHONE| SVIV |VIVERE| |NUMPAD| | | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' @@ -70,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_ortho_4x12( IT_GRAVE, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______, _______, _______, SECRET2, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC, - KC_CAPS, _______, SECRET0, SECRET3, SECRET4, MOUSE, NUMPAD, _______, _______, IT_LBRC, IT_RBRC, IT_BSLS, + KC_CAPS, _______, SECRET0, SECRET3, SECRET4, _______, NUMPAD, _______, _______, IT_LBRC, IT_RBRC, IT_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), @@ -119,15 +118,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F6 | F7 | F8 | F9 | F10 | F1 | F2 | F3 | F4 | F5 | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | RAISE| | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_FN] = LAYOUT_ortho_4x12( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, - _______, _______, _______, _______, _______, _______, _______, TG(_RAISE), _______, _______, _______, _______ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* MOUSE @@ -136,17 +135,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | MOUSE| | | |Scr Up|Scr Do| | + * | | | | | | | | | But1 |Scr Up|Scr Do| But2 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | |But1 | | |But2 | Left | Down | Up |Right | + * | | | | | | | | | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_MOUSE] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, MOUSE, _______, _______, _______, KC_MS_WH_DOWN, KC_MS_WH_UP, _______, - _______, _______, _______, _______, KC_MS_BTN1, _______, _______, KC_MS_BTN2, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_BTN2, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT ) }; diff --git a/keyboards/planck/keymaps/sigul/readme.md b/keyboards/planck/keymaps/sigul/readme.md index 12dbab36b0..11000967ed 100644 --- a/keyboards/planck/keymaps/sigul/readme.md +++ b/keyboards/planck/keymaps/sigul/readme.md @@ -1,38 +1,32 @@ # An ANSI Italian Planck Layout by Silvio Gulizia +The idea behind this layout is to have an American Keyboard with accented vowels (for Italian) to avoid switching language on the Mac every time you switch form English to Italian and being able to get the advantages that comes with the American (ANSI) keyboard when you write in English, code, or just want to use keybaord shorcuts (most of which are based on the American Keybaord). + +Some things I did, useful to you fi you want to have a look to the scheme or even replicate it for your language. + - [x] add layer _FN with F keys and VI navigation - [x] add layer _MOUSE with mouse keys -- [x] add "MOUSEKEY_ENABLE = yes" in rules.mk to enable mouse keys -- [x] add definition to control the mouse movementes in config.h +- [x] add "MOUSEKEY_ENABLE = yes" in rules.mk to enable mouse keys (moved to users/sigul/rules.mk) +- [x] add definition to control the mouse movementes in config.h (moved to users/sigul/config.h) - [x] add layer _NUMPAD to have a numpad -- [x] add keycode NUMPAD to toggle _NUMPAD -- [x] modify layer ADJUST to simplify remembering commands -- [x] add custom keycodes ESCFN and TABFN on QUERTY to add the ability to use arrows with hjkl by activating layer FN when held with the definition LT(_FN,KC_ESC) and LT(_FN, KC_TAB) -- [x] added "#define USB_MAX_POWER_CONSUMPTION 100" in config.h to use the keyboard with the iPad -- [x] add "#define TAPPING_TOGGLE 3" in config.h to enable tapping toggle with 3 taps on LOWER, RAISE and MOUSE keys +- [x] add keycode NUMPAD to toggle _NUMPAD (moved in users/sigul/sigul.h) +- [x] modify layer ADJUST to simplify remembering commands (Reset on R, Eeprom reset on E and so) +- [x] add custom keycodes ESCFN and TABFN on QUERTYi (default) layer to add the ability to use arrows with hjkl by activating layer FN when held with the definition LT(_FN,KC_ESC) and LT(_FN, KC_TAB) +- [x] added "#define USB_MAX_POWER_CONSUMPTION 100" in config.h to use the keyboard with the iPad (moved to users/sigul/config.h) +- [x] add "#define TAPPING_TOGGLE 3" in config.h to enable tapping toggle with 3 taps on LOWER and RAISE (moved to users/sigul/config.h) - [x] add tapping toggle to LOWER, RAISE and MOUSE keys -- [x] add "KEY_LOCK_ENABLE = yes" in rules.mk to enable caps lock - [x] add caps lock (KC_CAPS) to RAISE layer on the shift key - [x] Add del to a thumb layer -- [x] remove key lock because it can only be used on standard keys - [x] Add MT(MOD_LSFT, KC_ENT) shift when pressed, enter when tapped - [x] add home, end, pgup and pgwon on _RAISE instead of arrows -- [x] add shift enter - [x] change LSFT to S for more legibility -- [x] MT(kc) per usare shift come tasto es: MOD_LSFT(LCAG(KC_UP)). ??? MT(MOD_LSFT,KC_CAPS) -- [x] add macros on _FN to ouput website, email, tel, address, VAT ID credentials +- [x] add secrets on RAISE to be able to output personal data such as email, phone number, credit cards number... - [x] remap F keys upon numbers on _FN -- [x] check audio functionality -- [x] Add LT(_FN, IT_D) on D on the Querty layer +To DO - [ ] Add Hyper on ESC or TAB to be able to use it for custom keyboard shortcuts - [ ] consider using layer configuration to have just one keymap (see as a reference qmk_firmware/layouts/community/ortho_4x12/bredfield/) - [ ] add brightness up (KC_BRMU or KC_BRIU) and down (KC_BRMD or KC_BRID) - -- [ ] add secrets file in user space to add passwords on a password layer -- [ ] consider adding midi on the planck - [ ] consider adding AUTO_SHIFT_ENABLE = yes in rules.mk to be able to send shifted key depressing a key for twice the time - [ ] revert IT_ to KC_ where not required -- [ ] add swap from Mac to Win key code on Adjust layer -- [ ] evaluate to add auto shift diff --git a/keyboards/reversestudio/decadepad/config.h b/keyboards/reversestudio/decadepad/config.h new file mode 100644 index 0000000000..0e6622daae --- /dev/null +++ b/keyboards/reversestudio/decadepad/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> + +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/>. +*/ + +#pragma once + +#include "config_common.h" + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5253 +#define PRODUCT_ID 0x4450 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ReverseStudio +#define PRODUCT DecadePad +#define DESCRIPTION 6x4Pad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* NIU Mini PCB default pin-out */ +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN D5 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION
\ No newline at end of file diff --git a/keyboards/reversestudio/decadepad/decadepad.c b/keyboards/reversestudio/decadepad/decadepad.c new file mode 100644 index 0000000000..b1c3f58ced --- /dev/null +++ b/keyboards/reversestudio/decadepad/decadepad.c @@ -0,0 +1,7 @@ +#include "decadepad.h" +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)){ + writePin(D4, led_state.num_lock); + } + return true; +}
\ No newline at end of file diff --git a/keyboards/reversestudio/decadepad/decadepad.h b/keyboards/reversestudio/decadepad/decadepad.h new file mode 100644 index 0000000000..7da10094c7 --- /dev/null +++ b/keyboards/reversestudio/decadepad/decadepad.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" +#define LAYOUT_numpad_6x4( \ + k01, k02, k03, k04, \ + k11, k12, k13, k14, \ + k21, k22, k23, \ + k31, k32, k33, k34, \ + k41, k42, k43, \ + k51, k53, k54 \ +) \ +{ \ + { k01, k02, k03, k04 }, \ + { k11, k12, k13, k14 }, \ + { k21, k22, k23, KC_NO }, \ + { k31, k32, k33, k34 }, \ + { k41, k42, k43, KC_NO }, \ + { k51, KC_NO, k53, k54 }, \ +} diff --git a/keyboards/reversestudio/decadepad/info.json b/keyboards/reversestudio/decadepad/info.json new file mode 100644 index 0000000000..6a2219a0f3 --- /dev/null +++ b/keyboards/reversestudio/decadepad/info.json @@ -0,0 +1,40 @@ +{ + "keyboard_name": "DecadePad", + "url": "", + "maintainer": "huajijam", + "width": 6, + "height": 4, + "layouts": { + "LAYOUT_numpad_6x4": { + "key_count": 21, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":2, "h":2}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + + {"x":0, "y":5, "w":2}, + {"x":2, "y":5}, + {"x":3, "y":4, "h":2} + ] + } + } +}
\ No newline at end of file diff --git a/keyboards/reversestudio/decadepad/keymaps/default/keymap.c b/keyboards/reversestudio/decadepad/keymaps/default/keymap.c new file mode 100644 index 0000000000..695ceac301 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/default/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_6x4( + RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ) +}; diff --git a/keyboards/reversestudio/decadepad/keymaps/via/keymap.c b/keyboards/reversestudio/decadepad/keymaps/via/keymap.c new file mode 100644 index 0000000000..a9ca419185 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_6x4( + RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/reversestudio/decadepad/keymaps/via/rules.mk b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk new file mode 100644 index 0000000000..bee21da528 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no
\ No newline at end of file diff --git a/keyboards/reversestudio/decadepad/readme.md b/keyboards/reversestudio/decadepad/readme.md new file mode 100644 index 0000000000..8b4c9c4911 --- /dev/null +++ b/keyboards/reversestudio/decadepad/readme.md @@ -0,0 +1,12 @@ +# DecadePad + +A 6x4 Standard Numpad + +* Keyboard Maintainer: [huajijam](https://github.com/huajijam) +* Hardware Supported: DecadePad + +Make example for this keyboard (after setting up your build environment): + + make reversestudio/decadepad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/reversestudio/decadepad/rules.mk b/keyboards/reversestudio/decadepad/rules.mk new file mode 100644 index 0000000000..7730f09cdc --- /dev/null +++ b/keyboards/reversestudio/decadepad/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +UNICODE_ENABLE = yes # Unicode + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = numpad_6x4
\ No newline at end of file diff --git a/layouts/community/ergodox/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c index 3131c30640..c77920bb13 100644 --- a/layouts/community/ergodox/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -1,9 +1,11 @@ /* * About this keymap: - * - * The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak + * + * The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner - * keys. I've decided to continue using this layout with my ErgoDox. + * keys. When I originally set up this keymap, I'd decided to continue using this layout with my ErgoDox. + * I've since modified my layout to be more effective for me and to more closely match my other ortho + * keyboard layouts * * The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional * keys as shown in the diagrams. The Colemak layout is merely an adaptation of that. @@ -11,39 +13,47 @@ * I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck * layouts. * + * What's New: + * + * I've overhauled this Dvorak layout a bit to more match what I've got on my other Ortho boards. For + * some keys, I'm moving away from my old Kinesis keymap and adding the brackets and braces to the + * inner column vertical keys. I figure this will help me have better ease of use. In this update, I + * have also removed the keypad layer since I no longer use that at all, and have remapped the MEDIA + * layer a bit. + * */ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" -#include "eeconfig.h" -extern keymap_config_t keymap_config; +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _MEDIA, +}; -#define _DV 0 // Dvorak layer -#define _QW 1 // Qwerty layer -#define _CM 2 // Colemak layer -#define _MD 3 // Media Layer -#define _KP 4 // Keypad Layer +enum custom_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; -// Macro name shortcuts -#define DVORAK M(_DV) -#define QWERTY M(_QW) -#define COLEMAK M(_CM) +// Aliases to make the keymap more uniform +#define GUI_END GUI_T(KC_END) +#define MEDIA MO(_MEDIA) +#define MACLOCK LGUI(LCTL(KC_Q)) + +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 : Dvorak * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | / | + * | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | ~ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * |MEDIA | ` | ~ | Left | Rght | | Up | Dn | / | = | MEDIA| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | LCTL | LALT | | RALT | RCTL | @@ -54,65 +64,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' * */ -[_DV] = LAYOUT_ergodox( + +[_DVORAK] = LAYOUT_ergodox( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRC, KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_MD), - KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCBR, + MEDIA, KC_GRV, KC_TILD, KC_LEFT, KC_RGHT, + // left thumb KC_LCTL, KC_LALT, KC_HOME, - KC_BSPC, KC_DEL, KC_END, + KC_BSPC, KC_DEL, GUI_END, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, - XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - MO(_KP), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI, - KC_RALT, KC_RCTL, + KC_RCBR, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_UP, KC_DOWN, KC_SLSH, KC_EQL, MEDIA, + // right thumb + KC_RGUI, KC_RCTL, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC ), - /* Layer 1: QWERTY * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * |MEDIA | ` | = | Left | Rght | | Up | Dn | [ | ] | MEDIA| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCTL | LALT | | RALT | RCTL | + * | LCTL | LALT | | RGUI | RCTL | * ,------|------|------| |------+------+------. * | | | Home | | PgUp | | | * | BkSp | Del |------| |------| Enter| Space| * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[_QW] = LAYOUT_ergodox( +[_QWERTY] = LAYOUT_ergodox( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD), - KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, + MEDIA, KC_GRV, KC_EQL, KC_LEFT, KC_RGHT, + // left thumb KC_LCTL, KC_LALT, KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - MO(_KP), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI, - KC_LALT, KC_LCTL, + KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MEDIA, + // right thumb + KC_RGUI, KC_RCTL, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC ), @@ -120,41 +134,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 2 : Colemak * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | - * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * | MEDIA| ` | = | Left | Rght | | Up | Dn | [ | ] | MEDIA| * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | LCTL | LALT | | RALT | RCTL | + * | LCTL | LALT | | RGUI | RCTL | * ,------|------|------| |------+------+------. * | | | Home | | PgUp | | | * | BkSp | Del |------| |------| Enter| Space| * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[_CM] = LAYOUT_ergodox( +[_COLEMAK] = LAYOUT_ergodox( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD), - KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, + MEDIA, KC_GRV, KC_EQL, KC_LEFT, KC_RGHT, + // left thumb KC_LCTL, KC_LALT, KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - MO(_KP), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI, - KC_LALT, KC_LCTL, + KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MEDIA, + // right thumb + KC_RGUI, KC_RCTL, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC ), @@ -162,115 +178,64 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 3 : Media layer * ,--------------------------------------------------. ,--------------------------------------------------. - * | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * | F11 | F1 | F2 | F3 | F4 | F5 |TEENSY| | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | PrSc | ScLk | Paus | | | | | | Mute | Vol- | Vol+ | | | + * | | | | | | | | | | | PrSc | ScLk | Paus | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | | + * | CapsLk | | Mute | Vol- | Vol+ | |------| |------| |Dvorak|Qwerty|Colmak| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |Dvorak|Qwerty|Colemk| | | | | | | | | | | + * | | Stop | Prev | Play | Next | Sel | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | |MacLck| |MacLck| | * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ -[_MD] = LAYOUT_ergodox( +[_MEDIA] = LAYOUT_ergodox( // left hand - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, DVORAK, QWERTY, COLEMAK, _______, _______, + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______, _______, _______, _______, _______, _______, - _______, _______, + _______, MACLOCK, _______, _______, _______, _______, // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, - KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, + _______, DVORAK, QWERTY, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - - -/* Layer 4 : Keypad layer - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Power | | | | | | | | | | NmLk | KP = | KP / | KP * | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Sleep | | | | | | | | | | KP 7 | KP 8 | KP 9 | KP - | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | KP 0 | | KP . |KP Ent| | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[_KP] = LAYOUT_ergodox( - // left hand - KC_PWR, _______, _______, _______, _______, _______, _______, - KC_SLEP, _______, _______, _______, _______, _______, _______, - KC_WAKE, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, - _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, - KC_P0, _______, KC_PDOT, KC_PENT, _______, - _______, _______, + MACLOCK, _______, _______, - _______, _______, _______ + _______, _______, KC_INS ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} +// clang-format on - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _DV: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_CM); - } - break; - } - return MACRO_NONE; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DVORAK); + return false; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + return false; + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + return false; + } + } + return true; }; // Runs just one time when the keyboard initializes. diff --git a/layouts/community/ergodox/xyverz/readme.md b/layouts/community/ergodox/xyverz/readme.md index 134fb50afd..51315803b6 100644 --- a/layouts/community/ergodox/xyverz/readme.md +++ b/layouts/community/ergodox/xyverz/readme.md @@ -2,12 +2,16 @@ ## About this keymap: -The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. ~~Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox.~~ I've decided do give the normal placing of the SLSH, EQL, and xBRC keys a try, after using a different keyboard for a while... +The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. When I originally set up this keymap, I had decided to continue using this layout with my ErgoDox. I've since modified my layout to be more effective for me and to more closely match my other ortholinear keyboard layouts The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional keys as shown in the diagrams. The Colemak layout is merely an adaptation of that. I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. +## What's New: + +* I've overhauled this Dvorak layout a bit to more match what I've got on my other Ortho boards. For some keys, I'm moving away from my old Kinesis keymap and adding the brackets and braces to the inner column vertical keys. I figure this will help me have better ease of use. In this update, I have also removed the keypad layer since I no longer use that at all, and have remapped the MEDIA layer a bit. + ## Still to do: * Need to figure out a better position for the ESC key. @@ -16,107 +20,84 @@ I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar t ### Layer 0: Dvorak layer - ,--------------------------------------------------.,--------------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | / | - |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| - | Tab | ' | , | . | P | Y | || | F | G | C | R | L | \ | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | CapsLk | A | O | E | U | I |------||------| D | H | T | N | S | - | - |--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------| - | LShift | Z | X | C | V | X | || | B | M | W | V | Z | RShift | - `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' - | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | - `----------------------------------' `----------------------------------' - ,-------------.,-------------. - | LCtr | LAlt || Ralt | RCtr | - ,------|------|------||------+------+------. - | | | Home || PgUp | | | - | BkSp | Del |------||------| Enter| Space| - | | | End || PgDn | | | - `--------------------'`--------------------' + ,--------------------------------------------------. ,--------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | ~ | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ | + |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - | + |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |MEDIA | ` | ~ | Left | Rght | | Up | Dn | / | = | MEDIA| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | LCTL | LALT | | RGUI | RCTL | + ,------|------|------| |------+------+------. + | | | Home | | PgUp | | | + | BkSp | Del |------| |------| Enter| Space| + | | | End | | PgDn | | | + `--------------------' `--------------------' ### Layer 1: QWERTY layer - ,--------------------------------------------------.,--------------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| - | Tab | Q | W | E | R | T | || | Y | U | I | O | P | \ | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | CapsLk | A | S | D | F | G |------||------| H | J | K | L | ; | ' | - |--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------| - | LShift | Z | X | C | V | B | || | N | M | , | . | / | RShift | - `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' - | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | - `----------------------------------' `----------------------------------' - ,-------------.,-------------. - | LCtr | LAlt || Ralt | RCtr | - ,------|------|------||------+------+------. - | | | Home || PgUp | | | - | BkSp | Del |------||------| Enter| Space| - | | | End || PgDn | | | - `--------------------'`--------------------' + ,--------------------------------------------------. ,--------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |MEDIA | ` | = | Left | Rght | | Up | Dn | [ | ] | MEDIA| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | LCTL | LALT | | RGUI | RCTL | + ,------|------|------| |------+------+------. + | | | Home | | PgUp | | | + | BkSp | Del |------| |------| Enter| Space| + | | | End | | PgDn | | | + `--------------------' `--------------------' ### Keymap 2: Colemak layer - ,--------------------------------------------------.,--------------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| - | Tab | Q | W | F | P | G | || | J | L | U | Y | ; | \ | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | BkSpc | A | R | S | T | D |------||------| H | N | E | I | O | ' | - |--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------| - | LShift | Z | X | C | V | B | || | K | M | , | . | / | RShift | - `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' - | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | - `----------------------------------' `----------------------------------' - ,-------------.,-------------. - | LCtr | LAlt || Ralt | RCtr | - ,------|------|------||------+------+------. - | | | Home || PgUp | | | - | BkSp | Del |------||------| Enter| Space| - | | | End || PgDn | | | - `--------------------'`--------------------' + ,--------------------------------------------------. ,--------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ | + |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| + | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | MEDIA| ` | = | Left | Rght | | Up | Dn | [ | ] | MEDIA| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | LCTL | LALT | | RGUI | RCTL | + ,------|------|------| |------+------+------. + | | | Home | | PgUp | | | + | BkSp | Del |------| |------| Enter| Space| + | | | End | | PgDn | | | + `--------------------' `--------------------' ### layer 3 : Media layer - ,--------------------------------------------------.,--------------------------------------------------. - | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 || F12 | F6 | F7 | F8 | F9 | F10 | | - |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| - | | | PrSc | ScLk | Paus | | || | | Mute | Vol- | Vol+ | | | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | | | | | | |------||------| Stop | Prev | Play | Next | Sel | | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | | |Dvorak|Qwerty|Colemk| | || | | | | | | | - `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' - | | | | | | | | | | | | - `----------------------------------' `----------------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' - - - -### Keymap 4: Keypad layer - - ,--------------------------------------------------.,--------------------------------------------------. - | Power | | | | | | || | | NmLk | KP = | KP / | KP * | | - |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| - | Sleep | | | | | | || | | KP 7 | KP 8 | KP 9 | KP - | | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | Wake | | | | | |------||------| | KP 4 | KP 5 | KP 6 | KP + | | - |--------+------+------+------+------+------| || |------+------+------+------+------+--------| - | | | | | | | || | | KP 1 | KP 2 | KP 3 |KP Ent| | - `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' - | | | | | | | KP 0 | | KP . |KP Ent| | - `----------------------------------' `----------------------------------' - ,-------------.,-------------. - | | || | | - ,------|------|------||------+------+------. - | | | || | | | - | | |------||------| | | - | | | || | | | - `--------------------'`--------------------' + ,--------------------------------------------------. ,--------------------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 |TEENSY| | | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + | | | | | | | | | | | PrSc | ScLk | Paus | | | + |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + | CapsLk | | Mute | Vol- | Vol+ | |------| |------| |Dvorak|Qwerty|Colmak| | | + |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + | | Stop | Prev | Play | Next | Sel | | | | | | | | | | + `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | |MacLck| |MacLck| | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------'
\ No newline at end of file diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index c9811ea4b1..de270b4697 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -8,6 +8,7 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUS #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias #define RGB_SNK RGB_M_SN // Snake Animation alias +#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook! // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -78,8 +79,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12 ( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), @@ -96,8 +97,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_4x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), @@ -110,14 +111,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | |MacLck| | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12 ( \ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ _______, RESET, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, MACLOCK, _______, _______, _______, _______, _______, _______, _______ \ ) }; // clang-format on diff --git a/layouts/community/ortho_4x12/xyverz/readme.md b/layouts/community/ortho_4x12/xyverz/readme.md index d6614d956d..2ee86792ec 100644 --- a/layouts/community/ortho_4x12/xyverz/readme.md +++ b/layouts/community/ortho_4x12/xyverz/readme.md @@ -6,9 +6,12 @@ I'm moving all my 4x12s to the same keymap since I pretty much use it across all This revision includes this documentation and introduction of the individual RGB mode keys in the `ADJUST` layer. +## What's New? + * Added the Mac Lock macro of CMD+CTRL+Q to lock the screen on my mac. + * Changed the location of the `pipe` and `backslash` keys to match my other layouts. + ## Still to do: - * Update layout files to match current standards. * Enjoy this revision; figure out new things later. ### Qwerty layer @@ -57,9 +60,9 @@ This revision includes this documentation and introduction of the individual RGB ``` ,-----------------------------------------------------------------------------------. - | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | |------+------+------+------+------+-------------+------+------+------+------+------| - | Caps | | Mute | Vol- | Vol+ | | | _ | + | { | } | | | + | Caps | | Mute | Vol- | Vol+ | | | _ | + | { | } | | |------+------+------+------+------+------|------+------+------+------+------+------| | | | Prev | Play | Next | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -71,9 +74,9 @@ This revision includes this documentation and introduction of the individual RGB ``` ,-----------------------------------------------------------------------------------. - | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | |------+------+------+------+------+-------------+------+------+------+------+------| - | Caps | | Mute | Vol- | Vol+ | | | - | = | [ | ] | \ | + | Caps | | Mute | Vol- | Vol+ | | | - | = | [ | ] | | |------+------+------+------+------+------|------+------+------+------+------+------| | | | Prev | Play | Next | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -91,6 +94,6 @@ This revision includes this documentation and introduction of the individual RGB |------+------+------+------+------+------|------+------+------+------+------+------| |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | |------+------+------+------+------+------+------+------+------+------+------+------| - | | | | | | | | | | | | | + | | | | | |MacLck| | | | | | | `-----------------------------------------------------------------------------------' ``` diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 65b6f0a96f..e46e6c777d 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -16,8 +16,12 @@ ESSENTIAL_BINARIES = { 'dfu-programmer': {}, 'avrdude': {}, 'dfu-util': {}, - 'avr-gcc': {}, - 'arm-none-eabi-gcc': {}, + 'avr-gcc': { + 'version_arg': '-dumpversion' + }, + 'arm-none-eabi-gcc': { + 'version_arg': '-dumpversion' + }, 'bin/qmk': {}, } ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa'] @@ -36,9 +40,7 @@ def check_arm_gcc_version(): """Returns True if the arm-none-eabi-gcc version is not known to cause problems. """ if 'output' in ESSENTIAL_BINARIES['arm-none-eabi-gcc']: - first_line = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].split('\n')[0] - second_half = first_line.split(')', 1)[1].strip() - version_number = second_half.split()[0] + version_number = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].strip() cli.log.info('Found arm-none-eabi-gcc version %s', version_number) return True # Right now all known arm versions are ok @@ -48,8 +50,7 @@ def check_avr_gcc_version(): """Returns True if the avr-gcc version is not known to cause problems. """ if 'output' in ESSENTIAL_BINARIES['avr-gcc']: - first_line = ESSENTIAL_BINARIES['avr-gcc']['output'].split('\n')[0] - version_number = first_line.split()[2] + version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() major, minor, rest = version_number.split('.', 2) if int(major) > 8: @@ -154,14 +155,16 @@ def is_executable(command): return False # Make sure the command can be executed - check = run([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5, universal_newlines=True) + version_arg = ESSENTIAL_BINARIES[command].get('version_arg', '--version') + check = subprocess.run([command, version_arg], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5, universal_newlines=True) + ESSENTIAL_BINARIES[command]['output'] = check.stdout if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1 cli.log.debug('Found {fg_cyan}%s', command) return True - cli.log.error("{fg_red}Can't run `%s --version`", command) + cli.log.error("{fg_red}Can't run `%s %s`", (command, version_arg)) return False diff --git a/quantum/config_common.h b/quantum/config_common.h index f981f3f8cb..9861c86780 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -21,7 +21,7 @@ #define ROW2COL 1 // useful for direct pin mapping -#define NO_PIN (~0) +#define NO_PIN (pin_t)(~0) #ifdef __AVR__ # ifndef __ASSEMBLER__ @@ -63,6 +63,9 @@ # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 # define PIND_ADDRESS 0x9 +# elif defined(__AVR_ATtiny85__) +# define ADDRESS_BASE 0x10 +# define PINB_ADDRESS 0x6 # else # error "Pins are not defined" # endif diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index f34ba26e5a..570d4798de 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -51,17 +51,23 @@ action_t action_for_key(uint8_t layer, keypos_t key) { action_t action = {}; uint8_t action_layer, when, mod; + (void)action_layer; + (void)when; + (void)mod; + switch (keycode) { case KC_A ... KC_EXSEL: case KC_LCTRL ... KC_RGUI: action.code = ACTION_KEY(keycode); break; +#ifdef EXTRAKEY_ENABLE case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); break; case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN: action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); break; +#endif #ifdef MOUSEKEY_ENABLE case KC_MS_UP ... KC_MS_ACCEL2: action.code = ACTION_MOUSEKEY(keycode); @@ -93,6 +99,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) { action.code = ACTION_MACRO(keycode & 0xFF); break; #endif +#ifndef NO_ACTION_LAYER case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); break; @@ -117,6 +124,8 @@ action_t action_for_key(uint8_t layer, keypos_t key) { action_layer = keycode & 0xFF; action.code = ACTION_LAYER_TOGGLE(action_layer); break; +#endif +#ifndef NO_ACTION_ONESHOT case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:; // OSL(action_layer) - One-shot action_layer action_layer = keycode & 0xFF; @@ -127,6 +136,8 @@ action_t action_for_key(uint8_t layer, keypos_t key) { mod = mod_config(keycode & 0xFF); action.code = ACTION_MODS_ONESHOT(mod); break; +#endif +#ifndef NO_ACTION_LAYER case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); break; @@ -135,10 +146,13 @@ action_t action_for_key(uint8_t layer, keypos_t key) { action_layer = (keycode >> 4) & 0xF; action.code = ACTION_LAYER_MODS(action_layer, mod); break; +#endif +#ifndef NO_ACTION_TAPPING case QK_MOD_TAP ... QK_MOD_TAP_MAX: mod = mod_config((keycode >> 0x8) & 0x1F); action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF); break; +#endif #ifdef SWAP_HANDS_ENABLE case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff); diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h new file mode 100644 index 0000000000..da914767b8 --- /dev/null +++ b/quantum/keymap_extras/keymap_korean.h @@ -0,0 +1,128 @@ +/* Copyright 2020 + * + * 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/>. + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ₩ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │ + * ├─────┬──┴┬──┴──┬┴──┬┴───┴───┴───┴──┬┴──┬┴───┴┬──┴┬───┬─────┤ + * │ │ │ │Hnj│ │H↔Y│ │ │ │ │ + * └─────┴───┴─────┴───┴───────────────┴───┴─────┴───┴───┴─────┘ + */ +// Row 1 +#define KR_GRV KC_GRV // ` +#define KR_1 KC_1 // 1 +#define KR_2 KC_2 // 2 +#define KR_3 KC_3 // 3 +#define KR_4 KC_4 // 4 +#define KR_5 KC_5 // 5 +#define KR_6 KC_6 // 6 +#define KR_7 KC_7 // 7 +#define KR_8 KC_8 // 8 +#define KR_9 KC_9 // 9 +#define KR_0 KC_0 // 0 +#define KR_MINS KC_MINS // - +#define KR_EQL KC_EQL // = +// Row 2 +#define KR_Q KC_Q // Q +#define KR_W KC_W // W +#define KR_E KC_E // E +#define KR_R KC_R // R +#define KR_T KC_T // T +#define KR_Y KC_Y // Y +#define KR_U KC_U // U +#define KR_I KC_I // I +#define KR_O KC_O // O +#define KR_P KC_P // P +#define KR_LBRC KC_LBRC // [ +#define KR_RBRC KC_RBRC // ] +#define KR_WON KC_BSLS // ₩ +// Row 3 +#define KR_A KC_A // A +#define KR_S KC_S // S +#define KR_D KC_D // D +#define KR_F KC_F // F +#define KR_G KC_G // G +#define KR_H KC_H // H +#define KR_J KC_J // J +#define KR_K KC_K // K +#define KR_L KC_L // L +#define KR_SCLN KC_SCLN // ; +#define KR_QUOT KC_QUOT // ' +// Row 4 +#define KR_Z KC_Z // Z +#define KR_X KC_X // X +#define KR_C KC_C // C +#define KR_V KC_V // V +#define KR_B KC_B // B +#define KR_N KC_N // N +#define KR_M KC_M // M +#define KR_COMM KC_COMM // , +#define KR_DOT KC_DOT // . +#define KR_SLSH KC_SLSH // / +// Row 5 +#define KR_HANJ KC_LANG2 // Hanja (한자) +#define KR_HAEN KC_LANG1 // Han ↔ Yeong (한 ↔ 영) + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ + * ├─────┬──┴┬──┴──┬┴──┬┴───┴───┴───┴──┬┴──┬┴───┴┬──┴┬───┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └─────┴───┴─────┴───┴───────────────┴───┴─────┴───┴───┴─────┘ + */ +// Row 1 +#define KR_TILD S(KR_GRV) // ~ +#define KR_EXLM S(KR_1) // ! +#define KR_AT S(KR_2) // @ +#define KR_HASH S(KR_3) // # +#define KR_DLR S(KR_4) // $ +#define KR_PERC S(KR_5) // % +#define KR_CIRC S(KR_6) // ^ +#define KR_AMPR S(KR_7) // & +#define KR_ASTR S(KR_8) // * +#define KR_LPRN S(KR_9) // ( +#define KR_RPRN S(KR_0) // ) +#define KR_UNDS S(KR_MINS) // _ +#define KR_PLUS S(KR_EQL) // + +// Row 2 +#define KR_LCBR S(KR_LBRC) // { +#define KR_RCBR S(KR_RBRC) // } +#define KR_PIPE S(KR_WON) // | +// Row 3 +#define KR_COLN S(KR_SCLN) // : +#define KR_DQUO S(KR_COLN) // " +// Row 4 +#define KR_LABK S(KR_COMM) // < +#define KR_RABK S(KR_DOT) // > +#define KR_QUES S(KR_SLSH) // ? diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index ef7e8ae75d..33de162bb1 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -287,3 +287,18 @@ ifneq (,$(filter $(MCU),atmega328p)) NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif + +ifneq (,$(filter $(MCU),attiny85)) + PROTOCOL = VUSB + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + F_CPU ?= 16500000 + + # unsupported features for now + NO_UART ?= yes + NO_SUSPEND_POWER_DOWN ?= yes +endif diff --git a/quantum/quantum.c b/quantum/quantum.c index c857e5f7a1..76a48cc77c 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -145,10 +145,6 @@ void reset_keyboard(void) { #ifdef HAPTIC_ENABLE haptic_shutdown(); #endif -// this is also done later in bootloader.c - not sure if it's neccesary here -#ifdef BOOTLOADER_CATERINA - *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific -#endif bootloader_jump(); } @@ -288,9 +284,11 @@ bool process_record_quantum(keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { +#ifndef NO_RESET case RESET: reset_keyboard(); return false; +#endif #ifndef NO_DEBUG case DEBUG: debug_enable ^= 1; diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 2c65a34aa3..a8d01a9e8c 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -98,10 +98,6 @@ ifndef TEENSY_LOADER_CLI endif endif -# Program the device. -program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size - $(PROGRAM_CMD) - define EXEC_TEENSY $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex endef @@ -314,7 +310,9 @@ production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware -ifeq ($(strip $(BOOTLOADER)), caterina) +ifneq ($(strip $(PROGRAM_CMD)),) + $(PROGRAM_CMD) +else ifeq ($(strip $(BOOTLOADER)), caterina) $(call EXEC_AVRDUDE) else ifeq ($(strip $(BOOTLOADER)), halfkay) $(call EXEC_TEENSY) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index f3b4b399cc..6bacabbbf3 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -327,7 +327,9 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter -ifeq ($(strip $(BOOTLOADER)),dfu) +ifneq ($(strip $(PROGRAM_CMD)),) + $(PROGRAM_CMD) +else ifeq ($(strip $(BOOTLOADER)),dfu) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 19c3569d55..74db245c12 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -775,11 +775,12 @@ void register_code(uint8_t code) { add_mods(MOD_BIT(code)); send_keyboard_report(); } +#ifdef EXTRAKEY_ENABLE else if IS_SYSTEM(code) { host_system_send(KEYCODE2SYSTEM(code)); } else if IS_CONSUMER(code) { host_consumer_send(KEYCODE2CONSUMER(code)); } - +#endif #ifdef MOUSEKEY_ENABLE else if IS_MOUSEKEY(code) { diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index b8562f5a46..c283d26232 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -82,13 +82,13 @@ void layer_xor(layer_state_t state); # define layer_debug() # define layer_clear() -# define layer_move(layer) -# define layer_on(layer) -# define layer_off(layer) -# define layer_invert(layer) -# define layer_or(state) -# define layer_and(state) -# define layer_xor(state) +# define layer_move(layer) (void)layer +# define layer_on(layer) (void)layer +# define layer_off(layer) (void)layer +# define layer_invert(layer) (void)layer +# define layer_or(state) (void)state +# define layer_and(state) (void)state +# define layer_xor(state) (void)state #endif layer_state_t layer_state_set_user(layer_state_t state); diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index ca9746f327..7e5d2b0579 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -237,17 +237,17 @@ void bootloader_jump(void) { "bootloader_startup_loop%=: \n\t" "rjmp bootloader_startup_loop%= \n\t" : - : [ mcucsrio ] "I"(_SFR_IO_ADDR(MCUCSR)), + : [mcucsrio] "I"(_SFR_IO_ADDR(MCUCSR)), # if (FLASHEND > 131071) - [ ramendhi ] "M"(((RAMEND - 2) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 2) >> 0) & 0xff), [ bootaddrhi ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff), + [ramendhi] "M"(((RAMEND - 2) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 2) >> 0) & 0xff), [bootaddrhi] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 16) & 0xff), # else - [ ramendhi ] "M"(((RAMEND - 1) >> 8) & 0xff), [ ramendlo ] "M"(((RAMEND - 1) >> 0) & 0xff), + [ramendhi] "M"(((RAMEND - 1) >> 8) & 0xff), [ramendlo] "M"(((RAMEND - 1) >> 0) & 0xff), # endif - [ bootaddrme ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [ bootaddrlo ] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff)); + [bootaddrme] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 8) & 0xff), [bootaddrlo] "M"((((FLASH_SIZE - BOOTLOADER_SIZE) >> 1) >> 0) & 0xff)); #else // Assume remaining boards are DFU, even if the flag isn't set -# if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? +# if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATtiny85__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? UDCON = 1; USBCON = (1 << FRZCLK); // disable USB UCSR1B = 0; diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c index 88fa1dfa65..c2e6c6e081 100644 --- a/tmk_core/common/avr/timer.c +++ b/tmk_core/common/avr/timer.c @@ -45,19 +45,26 @@ void timer_init(void) { # error "Timer prescaler value is not valid" #endif -#ifndef __AVR_ATmega32A__ +#if defined(__AVR_ATmega32A__) + // Timer0 CTC mode + TCCR0 = _BV(WGM01) | prescaler; + + OCR0 = TIMER_RAW_TOP; + TIMSK = _BV(OCIE0); +#elif defined(__AVR_ATtiny85__) // Timer0 CTC mode TCCR0A = _BV(WGM01); TCCR0B = prescaler; - OCR0A = TIMER_RAW_TOP; - TIMSK0 = _BV(OCIE0A); + OCR0A = TIMER_RAW_TOP; + TIMSK = _BV(OCIE0A); #else // Timer0 CTC mode - TCCR0 = _BV(WGM01) | prescaler; + TCCR0A = _BV(WGM01); + TCCR0B = prescaler; - OCR0 = TIMER_RAW_TOP; - TIMSK = _BV(OCIE0); + OCR0A = TIMER_RAW_TOP; + TIMSK0 = _BV(OCIE0A); #endif } diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index be8485117c..39a918fe98 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -8,7 +8,7 @@ # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) # define pgm_read_word(address_short) *((uint16_t*)(address_short)) # define pgm_read_dword(address_short) *((uint32_t*)(address_short)) -# define pgm_read_ptr(address_short) *((void*)(address_short)) +# define pgm_read_ptr(address_short) *((void**)(address_short)) # define strcmp_P(s1, s2) strcmp(s1, s2) # define strcpy_P(dest, src) strcpy(dest, src) # define strlen_P(src) strlen(src) diff --git a/tmk_core/common/util.c b/tmk_core/common/util.c index f4f018de8d..861cca0054 100644 --- a/tmk_core/common/util.c +++ b/tmk_core/common/util.c @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "util.h" // bit population - return number of on-bit -uint8_t bitpop(uint8_t bits) { +__attribute__((noinline)) uint8_t bitpop(uint8_t bits) { uint8_t c; for (c = 0; bits; c++) bits &= bits - 1; return c; @@ -42,7 +42,7 @@ uint8_t bitpop32(uint32_t bits) { // most significant on-bit - return highest location of on-bit // NOTE: return 0 when bit0 is on or all bits are off -uint8_t biton(uint8_t bits) { +__attribute__((noinline)) uint8_t biton(uint8_t bits) { uint8_t n = 0; if (bits >> 4) { bits >>= 4; @@ -105,7 +105,7 @@ uint8_t biton32(uint32_t bits) { return n; } -uint8_t bitrev(uint8_t bits) { +__attribute__((noinline)) uint8_t bitrev(uint8_t bits) { bits = (bits & 0x0f) << 4 | (bits & 0xf0) >> 4; bits = (bits & 0b00110011) << 2 | (bits & 0b11001100) >> 2; bits = (bits & 0b01010101) << 1 | (bits & 0b10101010) >> 1; diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 1b88060f14..82a5f8e05f 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -69,14 +69,8 @@ extern host_driver_t lufa_driver; # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) #endif -// #if LUFA_VERSION_INTEGER < 0x120730 -// /* old API 120219 */ -// #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank) -// #else -/* new API >= 120730 */ #define ENDPOINT_BANK_SINGLE 1 #define ENDPOINT_BANK_DOUBLE 2 #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum), eptype, epsize, epbank) -// #endif #endif diff --git a/tmk_core/protocol/vusb/usbconfig.h b/tmk_core/protocol/vusb/usbconfig.h index f3cfd84aba..f156163510 100644 --- a/tmk_core/protocol/vusb/usbconfig.h +++ b/tmk_core/protocol/vusb/usbconfig.h @@ -123,7 +123,7 @@ section at the end of this file). * data from a static buffer, set it to 0 and return the data from * usbFunctionSetup(). This saves a couple of bytes. */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1 /* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. * You must implement the function usbFunctionWriteOut() which receives all * interrupt/bulk data sent to any endpoint other than 0. The endpoint number diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 47dc1245d0..00314ebe83 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -106,8 +106,6 @@ void raw_hid_send(uint8_t *data, uint8_t length) { usbPoll(); } usbSetInterrupt3(0, 0); - usbPoll(); - _delay_ms(1); } __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { @@ -160,10 +158,12 @@ typedef struct { } __attribute__((packed)) vusb_mouse_report_t; static void send_mouse(report_mouse_t *report) { +#if defined(MOUSE_ENABLE) vusb_mouse_report_t r = {.report_id = REPORT_ID_MOUSE, .report = *report}; if (usbInterruptIsReady3()) { usbSetInterrupt3((void *)&r, sizeof(vusb_mouse_report_t)); } +#endif } #ifdef EXTRAKEY_ENABLE diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h index dc24fae92f..3182ab026a 100644 --- a/users/sigul/sigul.h +++ b/users/sigul/sigul.h @@ -35,7 +35,6 @@ enum userspace_custom_keycodes { #define RAISE TT(_RAISE) #define NUMPAD TG(_NUMPAD) #define FN MO(_FN) -#define MOUSE TT(_MOUSE) #define TABFN LT(_FN, KC_TAB) #define ESCFN LT(_FN, KC_ESC) #define MS_B LT(_MOUSE, IT_B) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index 85d645e6d0..07888ffe12 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -9,11 +9,6 @@ function export_variables { export PATH=$PATH:$util_dir/flip/bin export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin - export PATH=$PATH:/mingw64/bin } export_variables - - - - diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh index cd88d2b655..78bbf9ccbf 100755 --- a/util/activate_wsl.sh +++ b/util/activate_wsl.sh @@ -12,7 +12,3 @@ function export_variables { } export_variables - - - - |