I think this function should not require the user to parse function_dumper()
output to know which sequences are safe to query.
use v5.30;
use Term::ReadLine;
my $term = Term::ReadLine->new('keyboard code and custom dispatch test');
say $term->get_function_name(($term->function_of_keyseq("\e[A"))[0]);
my $function_object = $term->function_of_keyseq("\e");
say "got function object";
say $term->get_function_name(($term->function_of_keyseq("\e"))[0]);
say "got function name";
perl test-function-of-keyseq
previous-history
got function object
Term::ReadLine::Gnu::XS::rl_get_function_name: Expected function to be of type rl_command_func_tPtr; got Keymap=SCALAR(0x55f129e3fe38) instead at /home/jroth/.plenv/versions/5.38.0/lib/perl5/site_perl/5.38.0/x86_64-linux/Term/ReadLine/Gnu.pm line 886.