Skip to content

Commit

Permalink
Move lighting keycodes to new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark committed Jan 14, 2025
1 parent 8bd66b0 commit e5a45fe
Show file tree
Hide file tree
Showing 19 changed files with 147 additions and 87 deletions.
2 changes: 1 addition & 1 deletion src/components/Keycodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
}
.tabs {
display: grid;
grid-template: auto / repeat(6, minmax(120px, 200px));
grid-template: auto / repeat(6, minmax(60px, 200px));
}
.tab {
text-overflow: ellipsis;
Expand Down
1 change: 1 addition & 0 deletions src/i18n/de.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media und Maus"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Tastatureinstellungen
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Tastenbelegung
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media and Mouse"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Keyboard Settings
keycodesTab:Lighting:label,Lighting
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,Steno
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/es.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media y Mouse"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Configuración de teclado
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"Apps, Médias et Souris"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Paramètres du clavier
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,Sténo
keymap:label,Disposition
Expand Down
1 change: 1 addition & 0 deletions src/i18n/it.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media e Mouse"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Configurazione Tastiera
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,Steno
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ja.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media and Mouse"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Keyboard Settings
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Media and Tetikus"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Seting papan kekunci
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/pl-PL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"Aplikacje, Mysz i Multimedia"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Ustawienia klawiatury
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Mapa klawiszy
Expand Down
1 change: 1 addition & 0 deletions src/i18n/pt-BR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"App, Midia e Mouse"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Configurações de teclado
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Keymap
Expand Down
1 change: 1 addition & 0 deletions src/i18n/ru.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,"Приложение, медиа и мышь"
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,Настройки клавиатуры
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,Quantum
keycodesTab:Steno:label,
keymap:label,Раскладка
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh-CN.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,应用、多媒体和鼠标
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,键盘设置
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,量子
keycodesTab:Steno:label,
keymap:label,键位
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh-HK.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,應用、多媒體和鼠標
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,鍵盤設置
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,量子
keycodesTab:Steno:label,
keymap:label,鍵位
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh-TW.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ keycodesTab:ANSI:label,ANSI
keycodesTab:AppMediaMouse:label,應用、多媒體和滑鼠
keycodesTab:ISO/JIS:label,ISO/JIS
keycodesTab:KeyboardSettings:label,鍵盤設定
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,量子
keycodesTab:Steno:label,
keymap:label,鍵位
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh.csv
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ keycodesTab:ANSI:label,
keycodesTab:AppMediaMouse:label,
keycodesTab:ISO/JIS:label,
keycodesTab:KeyboardSettings:label,
keycodesTab:Lighting:label,
keycodesTab:Quantum:label,
keycodesTab:Steno:label,
keymap:label,
Expand Down
25 changes: 14 additions & 11 deletions src/longFormKeycodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,8 @@ export const longFormKeycodes = {
SWIN: 'SGUI',

// RGB Lighting
RGB_MODE_FORWARD: 'RGB_MOD',
RGB_MODE_REVERSE: 'RGB_RMOD',
RGB_MODE_PLAIN: 'RGB_M_P',
RGB_MODE_BREATHE: 'RGB_M_B',
RGB_MODE_RAINBOW: 'RGB_M_R',
RGB_MODE_SWIRL: 'RGB_M_SW',
RGB_MODE_SNAKE: 'RGB_M_SN',
RGB_MODE_KNIGHT: 'RGB_M_K',
RGB_MODE_XMAS: 'RGB_M_X',
RGB_MODE_GRADIENT: 'RGB_M_G',
RGB_MODE_RGBTEST: 'RGB_M_T',
RGB_MODE_FORWARD: 'UG_NEXT',
RGB_MODE_REVERSE: 'UG_PREV',

// US ANSI Shifted Symbols
KC_TILDE: 'KC_TILD',
Expand Down Expand Up @@ -264,6 +255,18 @@ export const longFormKeycodes = {
// Grave Escape
GRAVE_ESC: 'QK_GESC',
KC_GESC: 'QK_GESC',
// RGBLight
RGB_TOG: 'UG_TOGG',
RGB_MOD: 'UG_NEXT',
RGB_RMOD: 'UG_PREV',
RGB_HUI: 'UG_HUEU',
RGB_HUD: 'UG_HUED',
RGB_SAI: 'UG_SATU',
RGB_SAD: 'UG_SATD',
RGB_VAI: 'UG_VALU',
RGB_VAD: 'UG_VALD',
RGB_SPI: 'UG_SPDU',
RGB_SPD: 'UG_SPDD',
// Space Cadet
KC_LCPO: 'SC_LCPO',
KC_RCPC: 'SC_RCPC',
Expand Down
8 changes: 6 additions & 2 deletions src/store/keycodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import ansi from './modules/keycodes/ansi';
import iso_jis from './modules/keycodes/iso-jis';
import quantum from './modules/keycodes/quantum';
import settings from './modules/keycodes/kb-settings';
import lighting from './modules/keycodes/lighting';
import media from './modules/keycodes/app-media-mouse';
import steno from './modules/keycodes/steno';

const keycodePickerTabLayout = {
ANSI_ISO: [...ansi, ...iso_jis],
ISO_ANSI: [...iso_jis, ...ansi],
special: [...quantum, ...settings, ...media]
special: [...quantum, ...settings, ...lighting, ...media]
};

/**
Expand Down Expand Up @@ -126,6 +127,7 @@ export const useKeycodesStore = defineStore('keycodes', {
'ISO/JIS': 0,
Quantum: 0,
KeyboardSettings: 0,
Lighting: 0,
AppMediaMouse: 0
},
steno: false,
Expand Down Expand Up @@ -165,6 +167,7 @@ export const useKeycodesStore = defineStore('keycodes', {
'ISO/JIS': countMatches(this.searchFilter, iso_jis),
Quantum: countMatches(this.searchFilter, quantum),
KeyboardSettings: countMatches(this.searchFilter, settings),
Lighting: countMatches(this.searchFilter, lighting),
AppMediaMouse: countMatches(this.searchFilter, media)
};
}
Expand Down Expand Up @@ -203,6 +206,7 @@ export const useKeycodesStore = defineStore('keycodes', {
* & Record<'ANSI', number>
* & Record<'Quantum', number>
* & Record<'KeyboardSettings', number>
* & Record<'Lighting', number>
* & Record<'AppMediaMouse', number>
* } SearchCounters
*
Expand All @@ -214,5 +218,5 @@ export const useKeycodesStore = defineStore('keycodes', {
* @property {string} searchFilter - current query in keycode picker search filter
* @property {SearchCounters} searchCounters - count of matching keycodes per tab
* @property {boolean} steno - is steno tab active
* @property {'ANSI'|'ISO/JIS'|'AppMediaMouse'|'Quantum'|'Steno'|'KeyboardSettings'} active - active tab
* @property {'ANSI'|'ISO/JIS'|'AppMediaMouse'|'Quantum'|'Steno'|'KeyboardSettings'|'Lighting'} active - active tab
*/
74 changes: 1 addition & 73 deletions src/store/modules/keycodes/kb-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,77 +155,5 @@ export default [
code: 'NK_TOGG',
title: 'Turn NKRO on or off',
width: 1500
},

{
label: 'Backlight settings',
width: 'label'
},

{
name: 'BL Toggle',
code: 'BL_TOGG',
title: 'Turn the backlight on or off'
},
{
name: 'BL Cycle',
code: 'BL_STEP',
title: 'Cycle through backlight levels'
},
{
name: 'BL Breath',
code: 'BL_BRTG',
title: 'Toggle backlight breathing'
},
{
name: 'BL On',
code: 'BL_ON',
title: 'Set the backlight to max brightness'
},
{
name: 'BL ⏶',
code: 'BL_UP',
title: 'Increase the backlight level'
},
{ width: 0 },
{ width: 3000 },
{
name: 'BL Off',
code: 'BL_OFF',
title: 'Turn the backlight off'
},
{
name: 'BL ⏷',
code: 'BL_DOWN',
title: 'Decrease the backlight level'
},

{ label: 'RGB Lighting settings', width: 'label' },

{
name: 'RGB Toggle',
code: 'RGB_TOG',
title: 'Toggle RGB lighting on or off'
},
{ name: 'RGB Mode ⏵', code: 'RGB_MOD', title: 'Next RGB mode' },
{ name: 'Hue ⏶', code: 'RGB_HUI', title: 'Increase hue' },
{ name: 'Sat ⏶', code: 'RGB_SAI', title: 'Increase saturation' },
{ name: 'Bright ⏶', code: 'RGB_VAI', title: 'Increase value' },
{ name: 'Speed ⏶', code: 'RGB_SPI', title: 'Increase RGB effect speed' },
{ name: 'RGB Mode P', code: 'RGB_M_P', title: 'RGB Mode: Plain' },
{ name: 'RGB Mode B', code: 'RGB_M_B', title: 'RGB Mode: Breathe' },
{ name: 'RGB Mode R', code: 'RGB_M_R', title: 'RGB Mode: Rainbow' },
{ name: 'RGB Mode SW', code: 'RGB_M_SW', title: 'RGB Mode: Swirl' },
{ name: 'RGB Mode SN', code: 'RGB_M_SN', title: 'RGB Mode: Snake' },
{ name: 'RGB Mode K', code: 'RGB_M_K', title: 'RGB Mode: Knight Rider' },
{ name: 'RGB Mode X', code: 'RGB_M_X', title: 'RGB Mode: Christmas' },
{ name: 'RGB Mode G', code: 'RGB_M_G', title: 'RGB Mode: Gradient' },
{ name: 'RGB Mode T', code: 'RGB_M_T', title: 'RGB Mode: Test' },
{ width: 0 },
{ width: 1000 },
{ name: 'RGB Mode ⏴', code: 'RGB_RMOD', title: 'Previous RGB mode' },
{ name: 'Hue ⏷', code: 'RGB_HUD', title: 'Decrease hue' },
{ name: 'Sat ⏷', code: 'RGB_SAD', title: 'Decrease saturation' },
{ name: 'Bright ⏷', code: 'RGB_VAD', title: 'Decrease value' },
{ name: 'Speed ⏷', code: 'RGB_SPD', title: 'Decrease RGB effect speed' }
}
];
111 changes: 111 additions & 0 deletions src/store/modules/keycodes/lighting.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
export default [
{ label: 'Lighting', group: true },

{ label: 'Backlight (single color)', width: 'label' },

{
name: 'Toggle BL',
code: 'BL_TOGG',
title: 'Turn backlight on and off'
},
{
name: 'BL On',
code: 'BL_ON',
title: 'Turn backlight on'
},
{
name: 'BL Cycle',
code: 'BL_STEP',
title: 'Cycle through brightness levels'
},
{
name: 'Bright ⏶',
code: 'BL_UP',
title: 'Increase backlight brightness'
},

{ width: 0 },

{ width: 1000 },
{
name: 'BL Off',
code: 'BL_OFF',
title: 'Turn backlight off'
},
{
name: 'BL Breath',
code: 'BL_BRTG',
title: 'Toggle backlight breathing'
},
{
name: 'Bright ⏷',
code: 'BL_DOWN',
title: 'Decrease backlight brightness'
},

{ label: 'LED Matrix (single color)', width: 'label' },

{
name: 'Toggle LM',
code: 'LM_TOGG',
title: 'Turn LED Matrix on and off'
},
{ name: 'LM On', code: 'LM_ON', title: 'Turn LED Matrix on' },
{ name: 'Mode ⏵', code: 'LM_NEXT', title: 'Next LED Matrix animation' },
{ name: 'Bright ⏶', code: 'LM_VALU', title: 'Increase brightness' },
{ name: 'Speed ⏶', code: 'LM_SPDU', title: 'Increase animation speed' },

{ width: 0 },

{ width: 1000 },
{ name: 'LM Off', code: 'LM_OFF', title: 'Turn LED Matrix off' },
{ name: 'Mode ⏴', code: 'LM_PREV', title: 'Previous LED Matrix animation' },
{ name: 'Bright ⏷', code: 'LM_VALD', title: 'Decrease brightness' },
{ name: 'Speed ⏷', code: 'LM_SPDD', title: 'Decrease animation speed' },

{ label: 'RGB Underglow', width: 'label' },

{
name: 'Toggle UG',
code: 'UG_TOGG',
title: 'Turn RGB Underglow on and off'
},
{ name: 'Mode ⏵', code: 'UG_NEXT', title: 'Next Underglow animation' },
{ name: 'Hue ⏶', code: 'UG_HUEU', title: 'Increase hue' },
{ name: 'Sat ⏶', code: 'UG_SATU', title: 'Increase saturation' },
{ name: 'Bright ⏶', code: 'UG_VALU', title: 'Increase value (brightness)' },
{ name: 'Speed ⏶', code: 'UG_SPDU', title: 'Increase animation speed' },

{ width: 0 },

{ width: 1000 },
{ name: 'Mode ⏴', code: 'UG_PREV', title: 'Previous Underglow animation' },
{ name: 'Hue ⏷', code: 'UG_HUED', title: 'Decrease hue' },
{ name: 'Sat ⏷', code: 'UG_SATD', title: 'Decrease saturation' },
{ name: 'Bright ⏷', code: 'UG_VALD', title: 'Decrease value (brightness)' },
{ name: 'Speed ⏷', code: 'UG_SPDD', title: 'Decrease animation speed' },

{ label: 'RGB Matrix', width: 'label' },

{
name: 'Toggle RM',
code: 'RM_TOGG',
title: 'Turn RGB Matrix on and off'
},
{ name: 'RM On', code: 'RM_ON', title: 'Turn RGB Matrix on' },
{ name: 'Mode ⏵', code: 'RM_NEXT', title: 'Next RGB Matrix animation' },
{ name: 'Hue ⏶', code: 'RM_HUEU', title: 'Increase hue' },
{ name: 'Sat ⏶', code: 'RM_SATU', title: 'Increase saturation' },
{ name: 'Bright ⏶', code: 'RM_VALU', title: 'Increase value (brightness)' },
{ name: 'Speed ⏶', code: 'RM_SPDU', title: 'Increase animation speed' },

{ width: 0 },

{ width: 1000 },
{ name: 'RM Off', code: 'RM_OFF', title: 'Turn RGB Matrix off' },
{ name: 'Mode ⏴', code: 'RM_PREV', title: 'Previous RGB Matrix animation' },
{ name: 'Hue ⏷', code: 'RM_HUED', title: 'Decrease hue' },
{ name: 'Sat ⏷', code: 'RM_SATD', title: 'Decrease saturation' },
{ name: 'Bright ⏷', code: 'RM_VALD', title: 'Decrease value (brightness)' },
{ name: 'Speed ⏷', code: 'RM_SPDD', title: 'Decrease animation speed' }
];

0 comments on commit e5a45fe

Please sign in to comment.