esolang

KeyF

A finger on a keyboard that may only move diagonally, and has to spell a swear word on the way.

None1, 2024 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: FUCK

The idea

None1 made KeyF in 2024. A pointer sits on the F key of a plain keyboard and can only step to a key above or below it, a half key to the left or right. To type, it presses the key it is on. That would be boring, the specification says, so there is one more rule. The keys it passes must spell f, u, c, k, and it has to stop on K. A program that breaks the rule prints nothing.

The machine

The keyboard has four rows, 1 to 0, Q to P, A to L and Z to M, and a space bar.

CharDoes
< >Step to the key above, on the left or the right
^ vStep to the key below, on the left or the right
.Press the key
,Press it with shift
!Caps lock
?Enter

From F, < goes to R, > to T, ^ to C and v to V. Where there is no key the pointer stays. Shift turns digits into )!@#$%^&*(, and there is no comma key, so the Hello World below has no comma. The specification's interpreter prints the text at the end with a line feed.

Example

The second program types H and I, and then still walks down to C and back up to K, as the rule asks.
Expected: HI

The second program types H and I, and then still walks down to C and back up to K, as the rule asks. Its author spent 16 minutes on this Hello World.

Expected: Hello World!

Further

Ideas it shows

Also in Jokes

Write your own in Run Convert a program from KeyF

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: keyf.

Command line

shib run keyf -e '?>v>v>^^<^<^>>v>v>v>v'
shib manual keyf

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/keyf.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org