StevePugh.co.uk

AutoHotKey Scripts

Some scripts I created for use with the excellent AutoHotKey utility. Note: Requires Microsoft Windows.

On this page:
Replace Caps Lock with Copy/Paste
Typing Extended Characters
Comments

Replace Caps Lock with Copy/Paste

In my opinion, the Caps Lock is not a particularly useful key. It is too easy to press by accident, and it's very rare to want to type a large amount of all-capitals text.

On the other hand, some of the most useful and common operations I perform using the keys are Cut (Ctrl-X), Copy (Ctrl-C) and Paste (Ctrl-V). These key combinations require a degree of finger strain due to the Ctrl key being at the bottom-left corner of the keyboard.

My solution is to redefine the Caps Lock:

Copy
Shift
+
Caps Lock
Cut
Ctrl
+
Caps Lock
Paste
Caps Lock

Installation

To get this setup:
  1. Install AutoHotKey.
  2. In the System Tray, right click on the AutoHotKey icon and select "Edit This Script".
  3. Paste in the downloaded script and save.
  4. Right click on the AutoHotKey icon and select "Reload This Script".
Download

See also: Caps Off!

Typing Extended Characters

The standard US and UK keyboards do not make it easy to type extended characters such as accented characters, copyright symbols, fractions, and other characters. This is despite the existence of the AltGr key, which is intented for just this purpose. The problem is that the default key mappings for both US and UK keyboards define only a very limited set of characters that can be typed using this key.

Perhaps in an attempt for the AltGr key to realize its potential, MS Windows also includes a keyboard layout called "US International" which enables many more characters to be typed, but also has some disadvantages:
- the apostrophe key is redefined and becomes a dead key.
- it's not suitable for non-US (e.g. UK) keyboard layouts.

Here is my solution: a script which makes use of the AltGr key to type the extra characters. It is largely based on the US International keyboard layout, but leaves all standard key presses unchanged, and is intended to work on both US and UK keyboards. All the additional characters can be typed with the help of the AltGr key. There are also some dead-key combinations which can be used to type an even wider variety of additional characters, again using the AltGr key.

The key mappings defined by the script are shown in blue and can be produced by holding down the AltGr key. Dead keys are indicated with a blue background.

UK Keyboard


``
!¡
1¹
""
2²
£
3³
$¤
4
%£
5
^^
6¼
&
7½
*
8¾
(
9
)
0
_
-¥
+÷
=×

BS

Tab
Ä
Qä
Å
Wå
É
Eé

R®
Þ
Tþ
Ü
Yü
Ú
Uú
Í
Ií
Ó
Oó
Ö
Pö

[«

]»

Caps
Á
Aá
§
Sß
Ð
Dð

F

G

H

J

K
Ø
Lø
:°
;
@
'
~~
#

Ret

Shift

\¬
Æ
Zæ

X
¢
C©

V

B
Ñ
Nñ
·
Mµ
Ç
,ç

.

/¿

Shift

Ctrl

Win

Alt


AltGr

Win

Menu

Ctrl

US Keyboard

~~
``
!¡
1¹
@
2²
#
3³
$¤
4
%£
5
^^
6¼
&
7½
*
8¾
(
9
)
0
_
-¥
+÷
=×

BS

Tab
Ä
Qä
Å
Wå
É
Eé

R®
Þ
Tþ
Ü
Yü
Ú
Uú
Í
Ií
Ó
Oó
Ö
Pö

[«

]»

\¬

Caps
Á
Aá
§
Sß
Ð
Dð

F

G

H

J

K
Ø
Lø
:°
;
""
'

Ret

Shift
Æ
Zæ

X
¢
C©

V

B
Ñ
Nñ
·
Mµ
Ç
,ç

.

/¿

Shift

Ctrl

Win

Alt


AltGr

Win

Menu

Ctrl

Examples

©

AltGr
+

c
á

AltGr
+

a
½

AltGr
+

7
Ñ

AltGr
+

~
then

N
â

AltGr
+
^
then

a
Ü

AltGr
+

"
then

U

Installation

To get this setup:
  1. Install AutoHotKey.
  2. In the System Tray, right click on the AutoHotKey icon and select "Edit This Script".
  3. Paste in the downloaded script and save.
  4. Right click on the AutoHotKey icon and select "Reload This Script".
Download

Comments

blog comments powered by Disqus
<<< back