KeyboardTimingProfile
Immutable keyboard timing and typo configuration.
Final classRLPlugins API
public final class KeyboardTimingProfileMembers
Constructors
- newKeyboardTimingProfile(double, double, double, double, long, long, long, long, long, long, int)
Creates a keyboard timing profile.
Methods
- longfunctionKeyBaseMs()
Function key base ms.
- longkeyHoldMaxMs()
Key hold max ms.
- longkeyHoldMeanMs()
Key hold mean ms.
- longkeyHoldMinMs()
Key hold min ms.
- intmaxMistypesPerChar()
Gets the maximum mistypes allowed for a single intended character.
- longrepeatKeyBaseMs()
Repeat key base ms.
- longsampleKeyHoldDelayMs()
Samples a key hold delay.
- charsampleMistypeChar(char)
Samples a printable wrong character for a typo.
- longsampleTransitionDelayMs(KeyCode, KeyCode)
Samples the transition delay before typing the current key.
- booleanshouldMistype()
Samples whether this character should be mistyped.
- doubleslowTransitionChance()
Slow transition chance.
- doubleslowTransitionMultiplier()
Slow transition multiplier.
- longtransitionMinMs()
Transition min ms.
- doubletypoChance()
Typo chance.
- KeyboardTimingProfilewithWordsPerMinute(double)
Returns a copy of this profile with different words-per-minute speed.
- doublewordsPerMinute()
Words per minute.
KeyboardTimingProfile(double, double, double, double, long, long, long, long, long, long, int)
public KeyboardTimingProfile(double wordsPerMinute, double typoChance, double slowTransitionChance, double slowTransitionMultiplier, long keyHoldMeanMs, long keyHoldMinMs, long keyHoldMaxMs, long transitionMinMs, long functionKeyBaseMs, long repeatKeyBaseMs, int maxMistypesPerChar)Creates a keyboard timing profile.
Parameters
wordsPerMinute- Words per minute.
typoChance- Typo chance.
slowTransitionChance- Slow transition chance.
slowTransitionMultiplier- Slow transition multiplier.
keyHoldMeanMs- Key hold mean ms.
keyHoldMinMs- Key hold min ms.
keyHoldMaxMs- Key hold max ms.
transitionMinMs- Transition min ms.
functionKeyBaseMs- Function key base ms.
repeatKeyBaseMs- Repeat key base ms.
maxMistypesPerChar- Max mistypes per char.
functionKeyBaseMs()
public long functionKeyBaseMs()Function key base ms.
keyHoldMaxMs()
public long keyHoldMaxMs()Key hold max ms.
keyHoldMeanMs()
public long keyHoldMeanMs()Key hold mean ms.
keyHoldMinMs()
public long keyHoldMinMs()Key hold min ms.
maxMistypesPerChar()
public int maxMistypesPerChar()Gets the maximum mistypes allowed for a single intended character.
Returns
Maximum mistypes.
repeatKeyBaseMs()
public long repeatKeyBaseMs()Repeat key base ms.
sampleKeyHoldDelayMs()
public long sampleKeyHoldDelayMs()Samples a key hold delay.
Returns
Delay in milliseconds.
sampleMistypeChar(char)
public char sampleMistypeChar(char intendedCharacter)Samples a printable wrong character for a typo.
Parameters
intendedCharacter- Intended character.
Returns
Wrong character.
sampleTransitionDelayMs(KeyCode, KeyCode)
public long sampleTransitionDelayMs(KeyCode previousKey, KeyCode currentKey)Samples the transition delay before typing the current key.
Parameters
previousKey- Previous physical key, or null.
currentKey- Current physical key.
Returns
Delay in milliseconds.
shouldMistype()
public boolean shouldMistype()Samples whether this character should be mistyped.
Returns
True when a typo should be introduced.
slowTransitionChance()
public double slowTransitionChance()Slow transition chance.
slowTransitionMultiplier()
public double slowTransitionMultiplier()Slow transition multiplier.
transitionMinMs()
public long transitionMinMs()Transition min ms.
typoChance()
public double typoChance()Typo chance.
withWordsPerMinute(double)
public KeyboardTimingProfile withWordsPerMinute(double wordsPerMinute)Returns a copy of this profile with different words-per-minute speed.
Parameters
wordsPerMinute- Words per minute.
Returns
Copied profile.
wordsPerMinute()
public double wordsPerMinute()Words per minute.
Also allowed
Every class has these, as in plain Java.
equals, toString