I pulled off a similar trick with a Sharp pocket computer, one of those that are programmed in Basic.
I found that there was no bounds checking for the text input. So if you filled up the input buffer (64 characters if I remember well) and you hit "insert" you begun to read memory outside of the buffer. The first surprise was, I kept inserting out of curiosity until I found the password with which I had stored a program in memory. Moreover, as the insert was shifting contents in memory, it was overwritten with "~~~~~~~~".
With this vulnerability you could hack the computer and access the program. You might corrupt a bit of it, but most of it was unharmed.
So is the same thing causing this hack in this Casio calculator?
Why does the video uploader tell which keys and how many times to press them if the only thing that matters is filling up the input buffer?
The calculator (probably) does NOT let you hack it, as regards the input buffer overflow, in most circumstances.
Except in some VERY rare ways.
So the exact keystrokes, steps it through a sequence, which the original designers of the calculator (software/firmware) overlooked.
The exact values may also set certain variables which happen to be just AFTER (or before or somewhere) the buffer. Which then enables the hacking of it.
Slightly more details here:
https://www.azabani.com/2014/01/02/hacking-casio-fx-82ms.htmlIt is quite possible other sequences will also hack it. But not ALL sequences, because the calculator probably stops/traps most buffer overflows, just not the one shown.
So they are giving you one of the sequences which work.
N.B. I DON'T know the details of this hack. So it might be different to how I described. But they usually have to be performed exactly (or very similar) as shown or they will tend to not work.
Sometimes people make spoof claims and the hacks are NOT true.
EDIT:
In principal, what you said/think may be correct. Only the early keystrokes and last few keystrokes, may be the critical bits. The bulk of the keystrokes in-between, filling out the buffer, may well NOT matter.
But I DON'T think I have access to that particular calculator to try it.