Changeset 11914


Ignore:
Timestamp:
Apr 9, 2009, 5:38:40 AM (11 years ago)
Author:
rme
Message:

If a key is ALPHA-CHAR-P and has no modifier or only a Shift modifier,
treat it as if it were bound to "Self Insert".

This helps ticket:218.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock/src/views.lisp

    r10614 r11914  
    190190       #+debug (log-debug "~&  binding ~s ~s" main-binding transparent-bindings)
    191191       (ring-push key *key-event-history*)
     192       ;; If the key represents an "alphabetic" character (of which there
     193       ;; are about 94000), and the event has no modifiers or only a shift
     194       ;; modifier, treat it if it were bound to "Self Insert".
     195       (when (eq main-binding (get-default-command))
     196         (let ((modifiers (key-event-bits-modifiers (key-event-bits key))))
     197           (when (and (alpha-char-p (key-event-char key))
     198                      (or (null modifiers)
     199                          (equal '("Shift") modifiers)))
     200             (setq main-binding (get-self-insert-command)))))
    192201       (when main-binding
    193202         (let* ((*last-last-command-type* (shiftf (hemlock-last-command-type view) nil))
Note: See TracChangeset for help on using the changeset viewer.