keybrd library is an open source library for creating custom-keyboard firmware.
選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。
1234567891011121314151617181920212223242526272829303132 |
- #include "LayerState.h"
-
- void LayerState::hold(const uint8_t layerId)
- {
- setActiveLayer(layerId);
- }
-
- void LayerState::unhold(const uint8_t layerId)
- {
- if (layerId == activeLayer);
- {
- setActiveLayer(lockedLayer);
- }
- }
-
- void LayerState::lock(const uint8_t layerId)
- {
- setActiveLayer(layerId);
- lockedLayer = layerId;
- }
-
- /* Derived classes override setActiveLayer() to also set LED indicator lights e.g. LayerState_LED
- */
- void LayerState::setActiveLayer(const uint8_t layerId)
- {
- activeLayer = layerId;
- }
-
- uint8_t LayerState::getActiveLayer()
- {
- return activeLayer;
- }
|