aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-12-15 21:30:21 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-12-15 21:30:21 +0100
commit52279dd08ceb29be175ad89840be26659f299475 (patch)
treef0241163f5b933e5c5953e4cb03fea57c4a70e13
parent7a215bf00d1249defe7624abf17e68dc140657ad (diff)
downloadahk-52279dd08ceb29be175ad89840be26659f299475.tar.gz
Add 'keyboard' script (hotkeys for new keyboard)
The Fujitsu FKB8530 is an optionally split keyboard, without arrow keys or numpad. These hotkeys made it very much bearable to use.
-rw-r--r--tt.keyboard.ahk41
-rw-r--r--tt.windows.ahk5
2 files changed, 43 insertions, 3 deletions
diff --git a/tt.keyboard.ahk b/tt.keyboard.ahk
new file mode 100644
index 0000000..caa2a18
--- /dev/null
+++ b/tt.keyboard.ahk
@@ -0,0 +1,41 @@
+;; Fujitsu FKB8530 mappings ---------------------------------------------------
+
+;; -> library
+
+Modifiers() {
+ s := ""
+ if (GetKeyState("Shift"))
+ s .= "{Shift down}"
+ if (GetKeyState("Ctrl"))
+ s .= "{Ctrl down}"
+ if (GetKeyState("Alt"))
+ s .= "{Alt down}"
+ return s
+}
+
+;; -> body
+
+LWin Up::Send {Esc}
+
+^<::^y
+*#BackSpace::Delete
+#F9::PrintScreen
+#F12::Insert
+
+*#h::SendInput, % Modifiers() "{Left down}"
+#h Up::SendInput, {Left up}
+*#j::SendInput, % Modifiers() "{Down down}"
+#j Up::SendInput, {Down up}
+*#k::SendInput, % Modifiers() "{Up down}"
+#k Up::SendInput, {Up up}
+*#l::SendInput, % Modifiers() "{Right down}"
+#l Up::SendInput, {Right up}
+
+*#y::SendInput, % Modifiers() "{Home down}"
+#y Up::SendInput, {Home up}
+*#u::SendInput, % Modifiers() "{PgDn down}"
+#u Up::SendInput, {PgDn up}
+*#i::SendInput, % Modifiers() "{PgUp down}"
+#i Up::SendInput, {PgUp up}
+*#o::SendInput, % Modifiers() "{End down}"
+#o Up::SendInput, {End up}
diff --git a/tt.windows.ahk b/tt.windows.ahk
index 84f6385..87f04e4 100644
--- a/tt.windows.ahk
+++ b/tt.windows.ahk
@@ -12,16 +12,15 @@ Gui, FakeWindow:Show, x0 y%y% AutoSize NA, FakeWindow
;; -> body
-#q::WinSet, Bottom,, A
-#a::WinSet, Top,, A
#t::WinSet, AlwaysOnTop, Toggle, A
-#y::
+#f::
WinGet, t, Transparent, A
if (t = OFF)
WinSet, Transparent, 180, A
else
WinSet, Transparent, OFF, A
return
+#g::WinSet, Top,, A
#b::WinSet, Bottom,, A
#!m::WinMove, A,, 0, 0