Short:        Amiga OS 3.2 Turkish Q PC Keyboard
Author:       blasterreal@gmail.com (Serkan DURSUN)
Uploader:     blasterreal gmail com (Serkan DURSUN)
Type:         driver/input
Version:      1.2
Architecture: m68k-amigaos >= 3.2
Distribution: Aminet
Kurz:         Amiga OS 3.2 Support

# Turkish-Q Keymap for AmigaOS 3.2

A Turkish-Q ("TR" PC layout) keyboard map for AmigaOS 3.2, written in
68000 assembly for `keymap.library`. Builds with SAS/C into a small
relocatable keymap module named `trk`, installed under
`DEVS:Keymaps/`.

## Files

- `turkish_q_pc.asm` ? the keymap source. Written from scratch (an
  earlier draft was adapted from an old 1986 Commodore British keymap
  template, but it turned out to have several bugs ? see the history
  note below ? so this version was rebuilt independently).
- `smakefile` ? SAS/C `smake` build file. Assembles the source with
  `asm` and links it with `slink` into the `trk` keymap binary.

## Building

Requires SAS/C 6.x for AmigaDOS (tested with 6.58).

```
smake            ; assemble + link -> trk
smake install    ; also copy the result to DEVS:Keymaps/trk
smake clean      ; remove built object/binary
```

Then activate it with `SetMap trk`, or select it permanently through
the Input/Locale preferences editor.

See the comment header at the top of `turkish_q_pc.asm` for exactly
what `smake` runs, and why it must use `slink` rather than `sc LINK`
(the latter tries to link this pure-data module as if it were a C
program and will produce a broken keymap).

## Layout

Standard Turkish-Q ("TR") layout ? the same physical arrangement as
a US/UK QWERTY keyboard, with the Turkish letters ?, ?, ü, ?, ö, ç
(and their uppercase forms ?, ?, Ü, ?, Ö, Ç) added at their usual
Turkish-Q positions. No dead keys / accent composing is used ?
Turkish doesn't need Latin diacritic dead keys, so every key is a
direct, single-keystroke character.

Alt-key combinations reproduce what a real Turkish-Q PC keyboard's
AltGr layer produces where a byte exists for it in the AmigaOS
character set (ISO-8859-9 / Latin-5). Two characters have no
representation in that single-byte character set and are therefore
not reproducible as a single keystroke:

- `?` (Euro sign) falls back to the generic currency sign `¤`.
- `?` (Turkish Lira sign, a modern Unicode-only character) is left
  blank on Alt+T.

## Development history / a note on correctness

The keymap byte order for `KC_VANILLA` keys was **not** what the
comments in the original 1986 template (or a first, "by the book"
rewrite) assumed. The correct order actually used by
`keymap.library` was determined empirically, by testing a diagnostic
key (`DC.B 1,2,3,4`) against every qualifier combination on real
AmigaOS 3.2 hardware:

| Qualifiers held | Byte read |
|---|---|
| none | 4th (last) |
| Shift | 3rd |
| Alt | 2nd |
| Shift+Alt | 1st |
| CapsLock | 3rd (same as Shift) |
| CapsLock+Alt | 1st (same as Shift+Alt) |

So each 4-byte `KC_VANILLA` entry in this file is written as
`DC.B ShiftAlt,Alt,Shift,Plain` ? confirmed correct against real
hardware, not just against documentation.

## Development

Developed/modified with the assistance of
[Claude Code](https://claude.com/claude-code) (Anthropic), working
interactively against real AmigaOS 3.2 hardware to diagnose and fix
the keymap byte-order issue described above.

## License

This project is free software, licensed under the
**GNU General Public License v3.0** (or, at your option, any later
version): https://www.gnu.org/licenses/gpl-3.0.html

In plain language: anyone is free to use this source code, change it
however they like, and share their own modified version ? there is
no restriction on how you use or adapt it. The only condition (as
with any GPL-licensed code) is that if you redistribute it, modified
or not, you keep it under the same license and keep the source
available to whoever you give it to.
