Disappearing Spy Journal

Jianfa Tsai’s Input

A spy or journal app that auto deletes the previous word, previous special character or previous number, after you pressed the space bar key. E.g. iPhone screen, note app, new note, the word “Hello” is typed, user pressed space bar key, the word “Hello” auto deletes and disappears. The next word “World” is typed, user pressed space bar key, the word “World” auto deletes and disappears from the screen. End result is a blank note.

Code UX Output

Type a word and press spacebar key:

Code Website

https://editor.p5js.org/tsai88jianfa/full/ER_EKZww2

Code Created By Gemini AI Pro

let journalInput;

function setup() {

// Turn off the default drawing canvas window since we only need a text field

noCanvas();

// Generate the text input element inside the application layout

journalInput = createInput(”);

journalInput.attribute(‘placeholder’, ‘Type secrets here…’);

// Apply visual styling directly to match a dark journal look

journalInput.style(‘width’, ‘300px’);

journalInput.style(‘padding’, ’12px’);

journalInput.style(‘font-size’, ’16px’);

journalInput.style(‘background-color’, ‘#1e1e1e’);

journalInput.style(‘color’, ‘#ffffff’);

journalInput.style(‘border’, ‘1px solid #333333’);

journalInput.style(‘border-radius’, ‘4px’);

// Route the keyboard listener tool straight to our interception logic

journalInput.elt.addEventListener(‘keydown’, function(event) {

// Intercept spacebar inputs instantly during the keydown cycle

if (event.key === ‘ ‘ || event.keyCode === 32) {

// Prevent the browser engine from appending a blank space character

event.preventDefault();

// Flush the value string out of the input field buffer

journalInput.value(”);

}

});

}

function draw() {

// This loop remains empty because text management runs via event loops

}

Created in 2026, May 25, by Jianfa Tsai (https://orcid.org/0009-0006-1809-1686) in collaboration with Gemini AI Pro. Jianfa Tsai resides at 60 Dowling Road, Oakleigh South, VIC 3167, Australia.

Read more: Architectural Analysis of an Ephemeral Key-Triggered Input System

Discover more from Life

Subscribe now to keep reading and get access to the full archive.

Continue reading