Giter Club home page Giter Club logo

keyboard-tweaks's Introduction

keyboard-tweaks

Ideas and scripts for optimizing your keyboard.

This project contains AutoHotkey scripts and Microsoft Keyboard Layout Creator (KLC) files for making your typing experience more comfortable and efficient.

AutoHotkey scripts

AltGr scripts

  • AltGr Progammer extension - making available commonly needed programmer keys such as brackets and symbols available in convenient locations.
  • AltGr International extension - making a variety of accented characters, currency, mathematical and other symbols all available via the AltGr key.

Extend layer scripts

  • Re-use a modifier key (e.g. CapsLock) for something much more useful. This script provides a navigation layer via holding a chosen modifier key and pressing other keys. Includes arrow keys, home, end, page up/down and more. If using the CapsLock key, the actual CapsLock function is still available via a mapping.

Misc scripts

  • Other miscellaneous AutoHotkey scripts: sticky shift, numeric keypad layer.

To try out any of the scripts, install the excellent AutoHotkey and then run the script. Or choose "Edit This Script" from the AutoHotkey menu and paste in the script you want to try. AutoHotKey version 1.1 is required.

KLC Wide Layouts

KLC Wide Layouts

  • Adopt a more comfortable typing posture by keeping a greater separation between your hands.
  • Easier access to keys on the right-hand side, e.g. Return, Backspace, Right Shift.
  • Currently available for UK Qwerty and UK Colemak keyboards, modifiable for other layouts.

To try out these layouts, a Windows installer is available in the zip package. Alternatevely, if you have Microsoft Keyboard Layout Creator installed, you can load in the KLC source file and make custom changes.

See Also

Seniply - A minimalist ergonomic keyboard layout using Extend and Symbols layers.

keyboard-tweaks's People

Contributors

stevep99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

keyboard-tweaks's Issues

Column / Block editing

This enabled in various editors such as Visual Studio and NotePad++ with <Shift><Alt> Up, Left, Right or Down.

However in the standard extend layout when I press CapsLock,D,G chord which should simulate <Shift><Alt> then I cannot move the cursor at all with any of I,J,K,L and so cannot use block or column editing. Is this a limitation of AHK? Limiting to 3 keys could be my keyboard? (A Microsoft Natural from 1996, 25 years and still going strong) If the latter I could add my own macro of course. Just wondering. Anyway tried Shift, Alt, Tab as CapsLock, S, D,G and that does work so it does not appear to be my keyboard. Strange. Is this an AHK issue?

Weird now it has started working. Maybe a flaky key.

Typo in extend_layer scripts

Hello,

there is a typo in the extend_layer scripts for the "alt up" key.

The line
F22 & SC025 Up::
should be
F22 & SC022 Up::

Thanks for this very handy script !

Extend layer breaks middle click

Leaving this issue here for anybody else who might run across similar issues with the extend AHK scripts on win10.

When running the extend AHK scripts, for some very peculiar reason it was no longer possible to perform middle-clicks. To fix this, simply remove this part:

#InputLevel 1
CapsLock::F22
#InputLevel 0

Then replace all the instances of F22 in the script with CapsLock using any text editor's find-and-replace feature.

Extend std layer script seems to be the wide script

Key mappings are all shifted to the right one key from what I expected the standard keyboard to be, as according to your key mappings png files and in read me description. This seems to be a wide file not standard UK Qwerty?

Great work by the way exactly what I was looking for.

Extend doesn't seem to work?

I'm trying to implement standard Extend layer for my QWERTY-to-Colemak key remapping, but it doesn't seem to work. Whenever I hold the Extend key (CapsLock), nothing happens. The CapsLock LED doesn't turn on, so AHK appears to be manipulating the CapsLock behaviour, but none of the Extend features work. It still types the regular alphabetical keys.

These are my files:
main.ahk

; -----------------------------------------------------------------------------
; AUTOHOTKEY SETTINGS
;
; These are generic AutoHotkey software settings, these commands control how
; AHK and the loaded scripts behave while the software is running.

; General
#NoEnv                      ; don't look for environment variables
#KeyHistory 0               ; don't keep key history
#SingleInstance force       ; don't allow scripts to run again
ListLines 0                 ; don't keep executed lines in history

; Performance
Process, Priority,, High    ; sets AHK process priority to high

; Input Mode and Delays
SendMode Input              ; disables all attributes below

; These attributes are kept for troubleshooting and benchmarking purposes,
; but they do not affect how the scripts work if SendMode is set to Input.
SetBatchLines, -1           ; disables 10 ms sleep between line executions
SetDefaultMouseSpeed, 0     ; makes mouse movements instant
SetKeyDelay, -1, -1         ; disables key press delay
SetMouseDelay, -1           ; disables mouse click delay

; Additional Delays
SetControlDelay, -1         ; disables Control command delays
setWinDelay, -1             ; disables window action delays

; -----------------------------------------------------------------------------
; SCRIPTS TO LOAD

; main key mapping
#Include %A_ScriptDir%\keyboard\layouts\qwerty_to_colemak.ahk

; Extend layer
#Include %A_ScriptDir%\keyboard\layers\colemak_extend.ahk

#InputLevel 1
sc03a::F22     ; define Extend on CapsLock
#InputLevel 0

scripts\keyboard\layouts\qwerty_to_colemak.ahk

; Numeric Row
;SC01::`
;SC02::1
;SC03::2
;SC04::3
;SC05::4
;SC06::5
;SC07::6
;SC08::7
;SC09::8
;SC0a::9
;SC0b::0
SC0c::vkDB
SC0d::vkDD

; Top Row
;SC010::q
;SC011::w
SC012::f
SC013::p
SC014::g
SC015::j
SC016::l
SC017::u
SC018::y
SC019::vkDE
SC01a::vkBA
SC01b::vkBB
SC02b::vkDC

; Home Row
;SC01E::a
SC01f::r
SC020::s
SC021::t
SC022::d
;SC023::h
SC024::n
SC025::e
SC026::i
SC027::o
SC028::vkBD

; Bottom Row
;SC02c::z
;SC02d::x
;SC02e::c
;SC02f::v
;SC030::b
SC031::k
;SC032::m
;SC033::,
;SC034::.
;SC035::/

scripts\keyboard\layers\colemak_extend.ahk

; AutoHotKey script for defining an Extend layer (default is CapsLock)
; Hold Extend and press other keys to provide navigation and other fuctionality
;
; The script defines F24 as Extend, so you can apply to any key of your choice
; e.g. to use CapsLock, define:
#InputLevel 1
CapsLock::F24
#InputLevel 0

#Persistent
SetCapsLockState, AlwaysOff

; digit row

F24 & SC001::
return

F24 & SC002::
  Send {Blind}{F1}
return

F24 & SC003::
  Send {Blind}{F2}
return

F24 & SC004::
  Send {Blind}{F3}
return

F24 & SC005::
  Send {Blind}{F4}
return

F24 & SC006::
  Send {Blind}{F5}
return

F24 & SC007::
  Send {Blind}{F6}
return

F24 & SC008::
  Send {Blind}{F7}
return

F24 & SC009::
  Send {Blind}{F8}
return

F24 & SC00A::
  Send {Blind}{F9}
return

F24 & SC00B::
  Send {Blind}{F10}
return

F24 & SC00C::
  Send {Blind}{F11}
return

F24 & SC00D::
  Send {Blind}{F12}
return

; top row

F24 & SC010::
  Send {Esc}
return

F24 & SC011::
  mouseclick, x1
  ;Send {Browser_Back}
return

F24 & SC012::
  Send {CtrlDown}{f}{CtrlUp}
return

F24 & SC013::
  mouseclick, x2
  ;Send {Browser_Forward}
return

F24 & SC014::
  Send {Insert}
return

F24 & SC015::
  Send {Blind}{PgUp}
return

F24 & SC016::
  Send {Blind}{Home}
return

F24 & SC017::
  Send {Blind}{Up}
return

F24 & SC018::
  Send {Blind}{End}
return

F24 & SC019::
  GetKeyState, cp, CapsLock, T
  if cp = D
    SetCapsLockState, AlwaysOff
  else
    SetCapsLockState, AlwaysOn
return

F24 & SC01A::
return

; middle row

F24 & SC01E::
  Send {Blind}{LAltDown}
return

F24 & SC01E Up::
  Send {LAltUp}
return

F24 & SC01F::
  Send {Blind}{LWinDown}
return

F24 & SC01F Up::
  Send {LWinUp}
return

F24 & SC020::
  Send {Blind}{ShiftDown}
return

F24 & SC020 Up::
  Send {ShiftUp}
return

F24 & SC021::
  Send {Blind}{CtrlDown}
return

F24 & SC021 Up::
  Send {CtrlUp}
return

F24 & SC022::
  Send {Blind}{RAltDown}
return

F24 & SC022 Up::
  Send {RAltUp}
return

F24 & SC023::
  Send {Blind}{PgDn}
return

F24 & SC024::
  Send {Blind}{Left}
return

F24 & SC025::
  Send {Blind}{Down}
return

F24 & SC026::
  Send {Blind}{Right}
return

F24 & SC027::
  Send {Blind}{Del}
return

F24 & SC028::
return

; bottom row

F24 & SC056::
  Send {CtrlDown}{y}{CtrlUp}
return

F24 & SC02C::
  Send {CtrlDown}{z}{CtrlUp}
return

F24 & SC02D::
  Send {CtrlDown}{x}{CtrlUp}
return

F24 & SC02E::
  Send {CtrlDown}{c}{CtrlUp}
return

F24 & SC02F::
  Send {CtrlDown}{v}{CtrlUp}
return

F24 & SC030::
return

F24 & SC031::
  Send {Blind}{PrintScreen}
return

F24 & SC032::
  Send {Blind}{Backspace}
return

F24 & SC033::
  Send {Blind}{Tab}
return

F24 & SC034::
  Send {AppsKey}
return

F24 & SC035::
  Send {Return}
return

; RAlt cancel caps / nav layer

RAlt::
  GetKeyState, cp, CapsLock, T
  if navLayer 
  {
    navLayer := 0
  } 
  else if cp = D
  {
    SetCapsLockState, AlwaysOff
  } 
Return

Video demo:

2023-01-30.15-21-48.mp4

--
Specs:

  • Windows 10 x64 21H2
  • AutoHotkey 1.1.35.00

How to use this with LAlt and use native Alt+Tab in ExtendLayer?

#InputLevel 1
LAlt::F22
#InputLevel 0

I tried to do the above and the layer working as expected. But it will break Alt+Tab and Alt+` that I have. Any solution on how do use regular alt on certain key combinations?

I've tried with something like:

F22 & SC00F::
  Send {Blind}{AltDown}{Tab}
return

F22 Up::
  Send {AltUp}
return

but this will cause my alt to have been stuck.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.