+ Sync your keymap configuration to GitHub +
++ Demo Mode +
++ GitHub login is disabled in demo mode. Repository and file + selection is simulated with sample data. +
+{gh.error}
++ {gh.user.name ?? gh.user.login} +
++ @{gh.user.login} +
++ Loading... +
++ No changes detected. Connect keyboard and load keymap to see + differences. +
+ )} ++ GitHub Keymap Sync allows you to export your current keyboard + configuration as a pull request to your ZMK config repository. + Connect your keyboard, select a repository and keymap file, then + create a PR with the updated bindings. +
+Login successful, you can close this window.
+ + +`; + + return new Response(html, { + headers: { "Content-Type": "text/html" }, + }); + } + + return env.ASSETS.fetch(request); + }, +}; diff --git a/wrangler.toml b/wrangler.toml index ab21f94..344e873 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,4 +1,5 @@ compatibility_date = "2024-06-11" +main = "src/worker.ts" assets = { directory = "./dist" } [env.release] From f55a1ffaf6f6c0ddc0b2265f5105c59853dfd428 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:17:22 +0000 Subject: [PATCH 3/4] Add GitHub keymap sync feature with OAuth, diff viewer, and PR creation Co-authored-by: cormoran <7994064+cormoran@users.noreply.github.com> --- src/hooks/useGitHub.ts | 2 +- src/lib/github.ts | 7 ++++++- src/lib/keymapFileGenerator.ts | 7 +------ src/pages/GitHubPage.tsx | 4 ---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/hooks/useGitHub.ts b/src/hooks/useGitHub.ts index f5dc3bd..d37666a 100644 --- a/src/hooks/useGitHub.ts +++ b/src/hooks/useGitHub.ts @@ -271,7 +271,7 @@ export function useGitHub(isDemo: boolean): UseGitHubReturn { const commitChanges = useCallback( async (keymap: Keymap, behaviors: Map