Skip to content

AutoHotKey Keyboard Layout with additional Scripts to ease coding.

License

Notifications You must be signed in to change notification settings

NicDom/better-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better coding keyboard icon

Better Coding Layout


Disclaimer

This Keyboard Layout is an extension of kwrtz german programer keybord layout. Make sure to check his repo out, if you like this one.

This icon was taken from all-free-download.


kwrtz Keyboard Layout is based on Standard German QWERTZ with the addition of two layers. I added some features, like a web search, a quick-command window and a window-switch together with a third "layer" to ease coding on a german keyboard layout.

Although this layout is based on a QWERTZ keyboard it can easily be adopted to any other keyboard.

Installation

Easiest way to use this script is to download the latest binary.

If you rather download the .zip or clone the repo to use the script note that you require AutoHotkey. This can either be installed via their installer, the Windows Store or using Scoop.

Installation via Scoop

If you don't have scoop installed. First install it. Open Powershell and type:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex

Then restart your Terminal and run:

scoop bucket add extras # adds the extra bucket
scoop install autohotkey # installs autohotkey

Once installed just clone the repository and open better_coding.ahk with AutoHotKey. Alternatively, you can also just copy the content of the files (better_coding.ahk and all files in utils) in one file and run this file with AutoHotKey.

Want to auto run the script on startup?

If you want the script to auto run when start up. You may compile the .exe file by going into the folder you clone the repository into and run

ahk2exe /in .\better_coding.ahk /out .\better_coding.exe

or (if you want to use the icon)

ahk2exe /in .\better_coding.ahk /out .\better_coding.exe /icon .\icons\better-coding-icon.ico

Create a shortcut to the .exe file and place it in the startup folder. You can find the startup folder by pressing Windows Key + r and type

shell:startup

The Layers

If you want to see the layout when using the script simply hold the respective layer key and press F12. As long as you keep F12 pressed, the layout will be displayed.

Special Keys Layer

The following Layer is enabled by holding CapsLock, ä or # down. The normal functionality of CapsLock is deactivated! Releasing the ä or # key, will print the respective character.

CapsLock, ä or # Layer

Layer for numbers and cursor movements

The following layer can be activated by holding Space down. If you press the Space key short, a Space character is printed (when the Space key is released). If you want a continuous printing of Space you have to hold down Space and press Alt. The layer was designed like the Ebene 4 of the neo-layout.org - but not exactly.

Pressing < will run a web search with the currently selected text. The search-engine may be "google", "brave", "ecosia" or "duckduckgo" and can be set at the beginning of better_coding.ahk. Pressing AltGr will open the QuickCommand-Window

Space-Layer

Additional functionalities layer

The following layers window-switch functionalities can be activated by holding AltGr down. The arrow key functionalities on the right side of the keyboard are available by pressing Alt.

alt-altgr-layer

Added Functionalities

QuickCommand-Window

The quick-command window is a small input box gui on the lower left corner of the display, which can be used to type in web search inquiries, open web pages. It also allows to define and use snippets to open web pages without typing the whole domain. Snippets are stored in quick-command-snippets.txt. One may edit this file either by opening it in any editor, or by running on of the following commands via the quick-command window: :Edit:, :edit:, :e:, :edit, :Edit, :e or e:. Most of the times you only want to add a snippet. This can be done by entering any of :Add:, :add:, :a:, :add, :Add, :a or a:. The use is then prompted for the snippet and its expansion.

The quick-command-snippets.txt is located in $USER\.config\better-coding. If the folder and/or file do not exist, they are created.

WindowSwitch

WindowSwitch allows to quickly switch between windows. It does:

  • open the chosen window, if it does not exist.
  • minimizes the chosen window, if it is active.
  • makes the chosen window active, if it exists and is not active.

Currently, implemented are window-switches for the following windows/programs:

  • Editor (Default VSCode)
  • Terminal
  • File Explorer
  • Messenger (Default Teams)
  • Reference Manager (Default Zotero)
  • Password Manager (Default KeePass)
  • Browser (Default Firefox)

The several programs for the window switches are stored in the configuration file ($USER/.config/better-coding/init.txt). In most cases it suffices to only enter the name of the program, e.g. teams or KeepassXC. The script tries to find the corresponding '.exe' file in the usual directories. If this method fails you have to enter the full path of the '.exe' in the config file.

Configuration

Todo

  • Add config.json, such that configurations, like the chosen browser, path files, etc. do not need to be defined in the script.
  • Add Gui to set configuration
  • Create Installer

Resources

About

AutoHotKey Keyboard Layout with additional Scripts to ease coding.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published