Skip to content

Commit 11fa058

Browse files
committed
Add PT+ windows layout
1 parent 168f7e0 commit 11fa058

File tree

5 files changed

+208
-1
lines changed

5 files changed

+208
-1
lines changed

keyboard/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Keyboard layouts
22

33
I base my 2 layouts on Portuguese Mac layout for both Windows and MacOS.
4-
Except for the positions of Win / Mac key everything else is the same across the different operative systems.
54

65
## PT+
76

keyboard/windows/PT+.klc

14.8 KB
Binary file not shown.

keyboard/windows/README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Installing Windows layout
2+
3+
## Specifics for Windows
4+
5+
At the moment only PT+ exists, as I have no need for PT-Dev on windows for now.
6+
7+
You need to **install** and **add the layout as input srouce**.
8+
Optionally, if you like key placements and shortcuts Mac style (ex: CMD+C for copy) there are also instuctions for it.
9+
10+
## Install the layouts
11+
12+
1. Download the installer for windows from the latest release on GitHub
13+
14+
1. Unzip and run the setup.exe
15+
16+
## [Alternative] Install the layouts (with MSKLC)
17+
18+
On Windows you can generate an installer from a `.klc` keyboard layout file.
19+
20+
1. Install Microsoft Keyboard Layout Creator (MSKLC) - https://www.microsoft.com/en-us/download/details.aspx?id=102134
21+
22+
1. Open MSKLC > Load Source File > Select the `.klc` file. You should see the layout open on MSKLC
23+
24+
1. Project > Build DLL and Setup Package > "Yes" to open the directory where the installer was created
25+
26+
1. Run the setup.exe
27+
28+
> If by any reason, it fails due to repeated name or some other detail, edit them Project > Properties and repeat
29+
the previous step to make a new setup package
30+
31+
## Add layout as input source
32+
33+
1. Go to Language Settings (Settings > Time & Language > Language)
34+
35+
1. Expand your current language > Options
36+
37+
1. Add a keyboard > Scroll until you find it (sorted alphabetically)
38+
39+
1. You can either remove the previous keyboard, or leave it there.
40+
Choose what you want to use on the Language Bar on the bottom right corner
41+
42+
## [Optional] Add MacOS like shortcuts
43+
44+
You may want to check https://medium.com/@chrisdhanaraj/mapping-your-macos-keybinds-to-windows-b6009c50065b where the author
45+
goes on a good explanation on how to remap Ctrl and Alt, and how to have the shortcuts. I made it a bit different,
46+
focused more on swapping Alt with Win key, and then adding the shortcuts, pick your poison.
47+
48+
Also, with my approach, if you have a keyboard with Mac mode, you don't need to do the
49+
[Swap Alt and Windows key location](#optional-swap-alt-and-windows-key-location)
50+
51+
1. Install AutoHotkey - https://www.autohotkey.com
52+
53+
1. Add a shortcut for the mac-win-shortcuts.ahk on your [startup](https://www.autohotkey.com/docs/FAQ.htm#Startup).
54+
> Press Win+R to open the Run dialog, then enter shell:startup to open the startup folder.
55+
56+
## [Optional] Swap Alt and Windows key location
57+
58+
1. Install [Sharpkeys](https://github.com/randyrants/sharpkeys/releases)
59+
60+
1. "Load keys" and select the provided `alt-win-swap.skl` OR click "Add" to add the new 4 mappings:
61+
62+
1. Special: Left Alt -> Special: Left Windows
63+
64+
1. Special: Left Windows -> Special: Left Alt
65+
66+
1. Special: Right Alt -> Special: Right Windows
67+
68+
1. Special: Right Windows -> Special: Right Alt
69+
70+
2. Once you see the 4 mappings on the SharpKeys, press "Write to Registry" and reboot
71+
72+
And with that, you should be done!
73+
74+
## Undo Alt and Windows swap
75+
76+
Follow the instructions of the previous section, but now "Delete All", and then "Write to Registry".
77+
78+
## Delete Installed layouts
79+
80+
1. Remove the keyboard from the input souce, the same way you added it at [Add layout as input source](#add-layout-as-input-source),
81+
but now click "Remove" on it
82+
83+
1. Remove it from registry (regedit.exe)
84+
85+
1. Delete it from inside `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts` (should be at the bottom)
86+
87+
1. Remove the dlls with the matching name of that layout
88+
89+
1. `C:\Windows\System32`
90+
91+
1. `C:\Windows\SysWOW64`
92+
93+
1. Reboot for good measure, or if it fails to delete the .dll files

keyboard/windows/alt-win-swap.skl

32 Bytes
Binary file not shown.
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
; Adds some mac like shortcuts, the original shortcuts still work
2+
3+
; # Win
4+
; ! Alt
5+
; ^ Ctrl
6+
; + Shift
7+
8+
; Undo - Win+z
9+
#z::
10+
Send, ^z
11+
return
12+
13+
; Cut - Win+x
14+
#x::
15+
Send, ^x
16+
return
17+
18+
; Copy - Win+c
19+
#c::
20+
Send, ^c
21+
return
22+
23+
; Paste - Win+v
24+
#v::
25+
Send, ^v
26+
return
27+
28+
; Find - Win+f
29+
#f::
30+
Send, ^f
31+
return
32+
33+
; Save - Win+s
34+
#s::
35+
Send, ^s
36+
return
37+
38+
; Switch Windows - Alt+Tab
39+
LWin & Tab::AltTab
40+
RWin & Tab::AltTab
41+
42+
; Run command - Ctrl+r
43+
^r::
44+
Send, #r
45+
return
46+
47+
; Refresh - Win+r
48+
#r::
49+
Send, {F5}
50+
return
51+
52+
; New tab - Win+t
53+
#t::
54+
Send, ^t
55+
return
56+
57+
; Re-open tab - Win+Shift+t
58+
#+t::
59+
Send, ^+t
60+
return
61+
62+
; Close tab - Win+w
63+
#w::
64+
Send, ^w
65+
return
66+
67+
; Close window - Win+q
68+
#q::
69+
Send, !{F4}
70+
return
71+
72+
; Select all - Win+a
73+
#a::
74+
Send, ^a
75+
return
76+
77+
; Home - Win+Left
78+
#Left::
79+
Send {Home}
80+
Return
81+
82+
; HomeShift - Win+Shift+Left
83+
#+Left::
84+
Send +{Home}
85+
Return
86+
87+
; End - Win+Right
88+
#Right::
89+
Send {End}
90+
Return
91+
92+
; EndShift - Win+Shift+Right
93+
#+Right::
94+
Send +{End}
95+
Return
96+
97+
; PgUp - Win+Up
98+
#Up::
99+
Send {PgUp}
100+
Return
101+
102+
; PgUpShift - Win+Shift+Up
103+
#+Up::
104+
Send +{PgUp}
105+
Return
106+
107+
; PgDn - Win+Down
108+
#Down::
109+
Send {PgDn}
110+
Return
111+
112+
; PgDnShift - Win+Shift+Down
113+
#+Down::
114+
Send +{PgDn}
115+
Return

0 commit comments

Comments
 (0)