From 2969e18450db94bdd79420dcdad02f355bc6a927 Mon Sep 17 00:00:00 2001 From: tariks Date: Fri, 29 Mar 2024 03:34:44 -0400 Subject: [PATCH 1/4] Add Dvorak layout --- lua/hawtkeys/keyboards/dvorak.lua | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lua/hawtkeys/keyboards/dvorak.lua diff --git a/lua/hawtkeys/keyboards/dvorak.lua b/lua/hawtkeys/keyboards/dvorak.lua new file mode 100644 index 0000000..80c6813 --- /dev/null +++ b/lua/hawtkeys/keyboards/dvorak.lua @@ -0,0 +1,50 @@ + +local layout = { + ["'"] = { finger = 1, row = 1, col = 1 }, + [","] = { finger = 2, row = 1, col = 2 }, + ["."] = { finger = 3, row = 1, col = 3 }, + p = { finger = 4, row = 1, col = 4 }, + y = { finger = 4, row = 1, col = 5 }, + f = { finger = 6, row = 1, col = 6 }, + g = { finger = 6, row = 1, col = 7 }, + c = { finger = 7, row = 1, col = 8 }, + r = { finger = 8, row = 1, col = 9 }, + l = { finger = 9, row = 1, col = 10 }, + ["/"] = { finger = 8, row = 1, col = 11 }, + ["="] = { finger = 9, row = 1, col = 12 }, + -- ["\\"] = { finger = 9, row = 1, col = 13 }, + + a = { finger = 1, row = 2, col = 1 }, + o = { finger = 2, row = 2, col = 2 }, + e = { finger = 3, row = 2, col = 3 }, + u = { finger = 4, row = 2, col = 4 }, + i = { finger = 4, row = 2, col = 5 }, + d = { finger = 6, row = 2, col = 6 }, + h = { finger = 6, row = 2, col = 7 }, + t = { finger = 7, row = 2, col = 8 }, + n = { finger = 8, row = 2, col = 9 }, + s = { finger = 9, row = 2, col = 10 }, + ["-"] = { finger = 9, row = 2, col = 11 }, + + [";"] = { finger = 2, row = 3, col = 1 }, + q = { finger = 3, row = 3, col = 2 }, + j = { finger = 4, row = 3, col = 3 }, + k = { finger = 4, row = 3, col = 4 }, + x = { finger = 4, row = 3, col = 5 }, + b = { finger = 6, row = 3, col = 6 }, + m = { finger = 6, row = 3, col = 8 }, + w = { finger = 7, row = 3, col = 9 }, + v = { finger = 8, row = 3, col = 10 }, + z = { finger = 9, row = 3, col = 11 }, + + [" "] = { finger = 4, row = 4, col = 6 }, -- Spacebar +} + +return { + layout = layout, +} + +------1-2-3-4-5-6-7-8-9-0 +---1- ' , . p y f g c r l / = \ +---2- a o e u i d h t n - +---3- ; q j k x b m v z From f2c74051b9d8de803b390bcd0280793d9eaca5d4 Mon Sep 17 00:00:00 2001 From: tariks Date: Fri, 29 Mar 2024 03:50:10 -0400 Subject: [PATCH 2/4] Add Dvorak support --- lua/hawtkeys/keyboards.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/hawtkeys/keyboards.lua b/lua/hawtkeys/keyboards.lua index 60d34b2..73714f0 100644 --- a/lua/hawtkeys/keyboards.lua +++ b/lua/hawtkeys/keyboards.lua @@ -1,10 +1,11 @@ local M = {} -- TODO: Make this dynamic, loading from the keyboards directory ----@alias HawtKeySupportedKeyboardLayouts "qwerty" | "colemak" | "colemak-dh" +---@alias HawtKeySupportedKeyboardLayouts "qwerty" | "colemak" | "colemak-dh" | "dvorak" M.qwerty = require("hawtkeys.keyboards.qwerty").layout M.colemak = require("hawtkeys.keyboards.colemak").layout M.colemakdh = require("hawtkeys.keyboards.colemak-dh").layout +M.dvorak = require("hawtkeys.keyboards.dvorak").layout return M From 6c54a24cac0f2c2f1d15dc1d1bed8bfc9c84d1c9 Mon Sep 17 00:00:00 2001 From: tariks Date: Fri, 29 Mar 2024 19:09:50 -0400 Subject: [PATCH 3/4] Add Dvorak to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 400a9af..b932f74 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,10 @@ We would welcome any PRs to add keyboard layouts. Keyboard Contributors: - [@delinx](https://github.com/delinx) [^1] +- [@tariks](https://github.com/tariks) [^2] [^1]: colemak / colemak-dh +[^2]: Dvorak ## 💻 Supported Versions From 4b51033681204c713cbc2ffe2f5d9fb30a27b163 Mon Sep 17 00:00:00 2001 From: Tristan Knight Date: Fri, 29 Mar 2024 23:19:47 +0000 Subject: [PATCH 4/4] style: remove blank line --- lua/hawtkeys/keyboards/dvorak.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/hawtkeys/keyboards/dvorak.lua b/lua/hawtkeys/keyboards/dvorak.lua index 80c6813..9dcf0d0 100644 --- a/lua/hawtkeys/keyboards/dvorak.lua +++ b/lua/hawtkeys/keyboards/dvorak.lua @@ -1,4 +1,3 @@ - local layout = { ["'"] = { finger = 1, row = 1, col = 1 }, [","] = { finger = 2, row = 1, col = 2 },