ignoring keyboard repeats in scripting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm using the following script on Fedora and CentOS computers (depending
on which machine is handy), which responds to a keypress, and have a
problem with keyboard repeats (when someone holds down the key too
long).  I can't turn it off in the BIOS, and I'm using the old run level
3 (text only mode), and settings made in a GUI don't seem to affect how
the keyboard gets used.  The computer is too old, slow, and not
compatible enough with X drivers, to run in the GUI mode.  

The problem is that some people don't just tap the key, they hold their
finger down on it.  I've used the kbdrate to delay the onset as much as
possible, and slow down the rate, but it's not really enough.  And
haven't found a solution to completely stop the keyboard repeating, or
have the script ignore them.  The script is used at a sporting event, to
play out a pre-recorded handicap count (e.g. "ready, set, 1, 2, 3, ...).

Ideally, I'd like to make the script ignore keyboard repeats, and have
normal keyboard repeats in the command line.  It's quite a pain to edit
any scripts if you can't get the cursor keys to repeat (on that note, I
wish the OS allowed cursor keys to repeat, and perhaps some others, but
not alphabetical keys, I see little reason to be able to type 50 letter
A's in a row).

And here's the script.

#! /bin/bash
while true
 do
  read -p "$*"
  killall -q paplay
  printf "Speaking now, press the ENTER key to stop"
  paplay handicap-count.ogg&

  read -p "$*"
  killall -p paplay
  printf "Stopped speaking, press the ENTER key to start"
 done

-- 
[tim@localhost ~]$ uname -rsvp
Linux 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64

All mail to my mailbox is automatically deleted, there is no point
trying to privately email me, I will only read messages posted to the
public lists.

George Orwell's '1984' was supposed to be a warning against tyranny, not
a set of instructions for supposedly democratic governments.

ZNQR LBH YBBX



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux