Skip to content

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vpnry committed Apr 3, 2024
0 parents commit 178a4ba
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 0 deletions.
99 changes: 99 additions & 0 deletions PaliKeyboardAHK.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#Requires AutoHotkey v2.0

; Pāḷi Keyboard AHK v1.0 - for Windows
; https://github.com/vpnry/palikeyboard

; Author: code snippets generated by ChatGPT & AHK Manual
; Mostly follow Velthuis transliteration


; -----------------------------
; Show Tray tip
; https://www.autohotkey.com/docs/v2/lib/TrayTip.htm
; -----------------------------
A_IconTip := "Pāḷi Keyboard AHK"

TrayTip "Pāḷi Keyboard AHK is started.`nHow to type: Right click on its icon > About.`n`nSukhi hotu!"
Sleep 3000 ; Let it display for 3 seconds.
HideTrayTip
HideTrayTip() {
TrayTip ; Attempt to hide it the normal way.
if SubStr(A_OSVersion,1,3) = "10." {
A_IconHidden := true
Sleep 200 ; It"" may be necessary to adjust this sleep.
A_IconHidden := false
}
}

; -----------------------------
; Show About in the A_TrayMenu
; -----------------------------

A_TrayMenu.Add()
A_TrayMenu.Add("About", ShowAbout)
HowtoString := "
(
Pāḷi Keyboard AHK v1.0
Source code etc.: https://github.com/vpnry/palikeyboard

--- VOWELS ---
aa => ā, ii => ī, uu => ū

--- UNDER DOTS ---
.m => ṃ
.n => ṇ
.d => ḍ
.l => ḷ
.r => ṛ
.s => ṣ
.t => ṭ

--- UPPER DOTS/TILDE ---
m.. => ṁ
n.. => ṅ
s.. => ś
,,n => ñ
)"
ShowAbout(*) {
MsgBox(HowtoString, "About")
return
}


; -------------------------------------
; Main input replacements here
; Similar: https://tipitakapali.org
; -------------------------------------

; Define hotstring triggers for Pali characters
:*?:aa::ā
:*?:ii::ī
:*?:uu::ū
:*?:m..::ṁ
:*?:.m::ṃ
:*?:.n::ṇ
:*?:.d::ḍ
:*?:.l::ḷ
:*?:.r::ṛ
:*?:.s::ṣ
:*?:s..::ś
:*?:.t::ṭ
:*?:,,n::ñ
:*?:n..::ṅ
:*?:AA::Ā
:*?:II::Ī
:*?:UU::Ū
:*?:M..::Ṁ
:*?:.M::Ṃ
:*?:.N::Ṇ
:*?:.D::Ḍ
:*?:.L::Ḷ
:*?:.R::Ṛ
:*?:.S::Ṣ
:*?:S..::Ś
:*?:.T::Ṭ
:*?:,,N::Ñ
:*?:N..::Ṅ

; Keep the script running
return
Binary file added PaliKeyboardAHK.ico
Binary file not shown.
Binary file added PaliKeyboardAHK.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Pāḷi Keyboard AHK Version 1.0
A simple Pāḷi Keyboard for **Windows** - using AutoHotKey v2

Generated for my personal use. Use at your own risk.

## Source code
Check: `PaliKeyboardAHK.ahk`

## How to use
1. Download the latest release file from [the releases](https://github.com/vpnry/palikeyboard/releases
).

2. Run the downloaded file.

Note: Since it is generated with [AutoHotKey](https://www.autohotkey.com/), antivirus software may flag the file as malicious.

If you do not trust `AutoHotKey`, do not use this keyboard.


### How to type

It is mostly similar to the Velthuis scheme.

```text
--- VOWELS ---
aa => ā, ii => ī, uu => ū
--- UNDER DOTS ---
.m => ṃ
.n => ṇ
.d => ḍ
.l => ḷ
.r => ṛ
.s => ṣ
.t => ṭ
--- UPPER DOTS/TILDE ---
m.. => ṁ
n.. => ṅ
s.. => ś
,,n => ñ
```

## Attributions
+ [Autohotkey](https://www.autohotkey.com)

+ `PaliKeyboardAHK.jpeg` is generated with Designer https://copilot.microsoft.com

+ Code snippets generated with ChatGPT and from AHK [Documentation](https://www.autohotkey.com/docs/v2/)


## Create a draft release

```
gh release create v1.0 --title "PaliKeyboardAHK v1.0" --notes "Click **> Assets** and download the PaliKeyboardAHK.exe file." PaliKeyboardAHK.exe --draft
Then login Github, https://github.com/vpnry/palikeyboard/releases, final check then change from draft to release
```

0 comments on commit 178a4ba

Please sign in to comment.