-stxllxr -stxllxr loading
define last key pressed
set [i v] to (1)
repeat (length of [abcdefghijklmnopqrstuvwxyz 1234567890]
if <key (letter (i) of [abcdefghijklmnopqrstuvwxyz 1234567890]) pressed?> then
set [last key pressed v] to (letter (i) of [abcdefghijklmnopqrstuvwxyz 1234567890
end
change [i v] by (1)
this is the simplest way to detect the last key pressed, however holding down b then pressing a breaks it, so I recommend addjng a wait until after the custom block, not inside the custom block since the custom block needs “run without screen refresh”.