Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an interface to configure Combos #65

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Add an interface to configure Combos #65

merged 1 commit into from
Jan 3, 2025

Conversation

sago35
Copy link
Owner

@sago35 sago35 commented Dec 24, 2024

Now it is possible to configure Combos from source code.

	// Combos
	combos := []keyboard.Combo{
		{
			Keys:      [4]keyboard.Keycode{jp.KeyQ, jp.KeyZ},
			OutputKey: jp.KeyMediaMute,
		},
		{
			Keys:      [4]keyboard.Keycode{jp.KeyW, jp.KeyX},
			OutputKey: jp.KeyMediaVolumeDec,
		},
		{
			Keys:      [4]keyboard.Keycode{jp.KeyE, jp.KeyC},
			OutputKey: jp.KeyMediaVolumeInc,
		},
		{
			Keys:      [4]keyboard.Keycode{jp.KeyR, jp.KeyV},
			OutputKey: jp.KeyMediaBrightnessDown,
		},
		{
			Keys:      [4]keyboard.Keycode{jp.KeyT, jp.KeyB},
			OutputKey: jp.KeyMediaBrightnessUp,
		},
	}
	for i, c := range combos {
		d.SetCombo(i, c)
	}

@sago35
Copy link
Owner Author

sago35 commented Dec 24, 2024

Since this PR changes the way data is stored in Flash, you need to initialize it using options like -tags reset_to_default.

@sago35 sago35 merged commit 8312259 into main Jan 3, 2025
1 check passed
@sago35 sago35 deleted the combos branch January 3, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant