Skip to content

Xarty with AHK

CarrieForle edited this page Jun 11, 2023 · 27 revisions

Introduction

There are 2 AHK (AutoHotKey) versions available.

  • Xarty.ahk
  • Xarty-extend.ahk

The difference between them is Xarty-extend.ahk has extend layer and compose features, while Xarty.ahk is plainly remapping, which is a lot simpler. There isn't too much for Xarty.ahk. Everything works like what you expect how a typical keyboard to work. For reference, You may refer to the official AHK documentation, it recorded more technical and specific details of the remapping.

Xarty-extend.ahk

There is, however, a lot to say about Xarty-extend.ahk. That's actually why I wrote this Wiki in the first place. The goal is to tell what you should expect when you are using this version of the layout, what feature does it has, without having to learn AHK and going through the rather awful spaghetti source code.

Features

Xarty-extend.ahk supports 3 extend layers and compose feature. You cannot customize the extend layers, but you can write your own text to compose with compose.ini, which will be automatically generated on the first run or when compose.ini is not found in the working folder. Refer here for the specification about compose.ini.

Extend layers

The extend key is CapsLock. When you press the extend key, the first extend layer will be activated. The CapsLock itself will not be toggled (There's a key in the first extend layer where you can toggle CapsLock, serve as a replacement). When you release the extend key, the extend layer will be deactivated and go back to the normal status of Xarty layout. Shift and Ctrl is for the second and the third extend layer respectively. However, you do not just press Shift or Ctrl to activate the dedicated extend layer. You have to combine with the extend key (CapsLock) in order to activate. After activation, you can optionally release Shift (for the second layer) or Ctrl (for the third layer). The extend layer is stay activated as long as the extend key is stay pressed. If you press the extend key, Shift, Ctrl at the same time, the first extend layer is activated.

In a nutshell, you activate the extend layers with the extend key, optionally combined with either Shift or Ctrl or to activate different extend layers. Extend layers are stay active so long as the extend key is pressed. Shift and Ctrl are not required. You deactivate the extend layers when the extend key is released. Pressing extend layer combined with both Shift and Ctrl is as same as pressing it alone, activating the first extend layer.

Compose

The compose key is the right Windows key (RWin). When you press the compose key, nothing will happen, not even the start menu will show up. RWin is completely lose its original functionality for compose feature, just like CapsLock for extend layer. To use compose feature, type one of the recognized sequence in compose.ini and press the compose key. Upon pressing, the sequence will be translated to the dedicated text. For example, btw is one of the sequence predefined in compose.ini. Type this sequence correctly (it's case sensitve), followed by a press of compose key, and btw will be translated to By the way. You can modify compose.ini and create your own compose sequence (or delete the predefined ones). A restart of the layout is required for the change to be made into practice.

TO-DO

Clone this wiki locally