Variable: type-break-keystroke-threshold
type-break-keystroke-threshold is a customizable variable defined in
type-break.el.gz.
Value
(2100 . 10500)
Documentation
Upper and lower bound on number of keystrokes for considering typing break.
This structure is a pair of numbers (MIN . MAX).
The first number is the minimum number of keystrokes that must have been entered since the last typing break before considering another one, even if the scheduled time has elapsed; the break is simply rescheduled until later if the minimum threshold hasn't been reached. If this first value is nil, then there is no minimum threshold; as soon as the scheduled time has elapsed, the user will always be queried.
The second number is the maximum number of keystrokes that can be entered before a typing break is requested immediately, preempting the originally scheduled break. If this second value is nil, then no preemptive breaks will occur; only scheduled ones will.
Keys with bucky bits (shift, control, meta, etc) are counted as only one keystroke even though they really require multiple keys to generate them.
The command type-break-guesstimate-keystroke-threshold can be used to
guess a reasonably good pair of values for this variable.
Source Code
;; Defined in /usr/src/emacs/lisp/type-break.el.gz
(defcustom type-break-keystroke-threshold
;; Assuming typing speed is 35wpm (on the average, do you really
;; type more than that in a minute? I spend a lot of time reading mail
;; and simply studying code in buffers) and average word length is
;; about 5 letters, default upper threshold to the average number of
;; keystrokes one is likely to type in a break interval. That way if the
;; user goes through a furious burst of typing activity, cause a typing
;; break to be required sooner than originally scheduled.
;; Conversely, the minimum threshold should be about a fifth of this.
(let* ((wpm 35)
(avg-word-length 5)
(upper (* wpm avg-word-length (/ type-break-interval 60)))
(lower (/ upper 5)))
(cons lower upper))
"Upper and lower bound on number of keystrokes for considering typing break.
This structure is a pair of numbers (MIN . MAX).
The first number is the minimum number of keystrokes that must have been
entered since the last typing break before considering another one, even if
the scheduled time has elapsed; the break is simply rescheduled until later
if the minimum threshold hasn't been reached. If this first value is nil,
then there is no minimum threshold; as soon as the scheduled time has
elapsed, the user will always be queried.
The second number is the maximum number of keystrokes that can be entered
before a typing break is requested immediately, preempting the originally
scheduled break. If this second value is nil, then no preemptive breaks
will occur; only scheduled ones will.
Keys with bucky bits (shift, control, meta, etc) are counted as only one
keystroke even though they really require multiple keys to generate them.
The command `type-break-guesstimate-keystroke-threshold' can be used to
guess a reasonably good pair of values for this variable."
:set-after '(type-break-interval)
:type '(cons (choice integer (const nil)) (choice integer (const nil)))
:group 'type-break)