I find this problem persists on my Dell XPS 13 notebook running Ubuntu 16.04 LTS, even when using a virtual terminal instead of the graphical environment.
Running with strace shows rapidfire poll() calls on standard input, followed by read calls returning single letters corresponding to those I actually pressed: p,d,q. So, it is not as if a key is "stuck" (see strace log below). This leads me to believe it is not a keymap or "Gnome" problem.
Debugging with gdb disassembly doesn't tell me much, I just see a lot of calls into ncurses library. Hard to tell what's going on without structured sources.
Code:
cmerck@sagittarion:~/usr/adom$ grep -A 2 -B 2 read\(0 strace.log
poll([{fd=0, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0) = 1 ([{fd=0, revents=POLLIN}])
read(0, "p", 1) = 1
getcwd("/home/cmerck/usr/adom", 511) = 22
chdir("/home/cmerck/.adom.data") = 0
--
poll([{fd=0, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=0, events=POLLIN}], 1, 0) = 1 ([{fd=0, revents=POLLIN}])
read(0, "d", 1) = 1
rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f3707969390}, {0x7f3707db2960, [], SA_RESTORER|SA_RESTART, 0x7f3707969390}, 8) = 0
write(1, "\33[39;49m\33[37m\33[40m\33[H\33[2J", 25) = 25
--
rt_sigaction(SIGTSTP, {0x7f3707db2960, [], SA_RESTORER|SA_RESTART, 0x7f3707969390}, NULL, 8) = 0
poll([{fd=0, events=POLLIN}], 1, 0) = 1 ([{fd=0, revents=POLLIN}])
read(0, "q", 1) = 1
write(1, "\33[?25l", 6) = 6
rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7f3707969390}, {0x7f3707db2960, [], SA_RESTORER|SA_RESTART, 0x7f3707969390}, 8) = 0
cmerck@sagittarion:~/usr/adom$