Added support for specifying the delay in milliseconds before a pressed

key begins to auto-repeat.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2170 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2003-01-17 01:33:34 +00:00
parent 91c173b6e5
commit a5c348a775
3 changed files with 73 additions and 11 deletions
@@ -1,5 +1,5 @@
//
// $Id: KeyTranslator.java,v 1.4 2003/01/14 00:53:38 shaper Exp $
// $Id: KeyTranslator.java,v 1.5 2003/01/17 01:33:34 shaper Exp $
package com.threerings.util;
@@ -36,10 +36,17 @@ public interface KeyTranslator
/**
* Returns the number of times each second that key presses are to be
* automatically repeated while the key is held down.
* automatically repeated while the key is held down, or
* <code>0</code> to disable auto-repeat for the key.
*/
public int getRepeatRate (int keyCode);
/**
* Returns the delay in milliseconds before generating auto-repeated
* key press events for the specified key.
*/
public long getRepeatDelay (int keyCode);
/**
* Returns an iterator that iterates over the available press
* commands.