Changeset 11917


Ignore:
Timestamp:
Apr 9, 2009, 6:25:24 AM (11 years ago)
Author:
rme
Message:

Add preference option "Use option key as meta" to the "General" pane
of the preferences panel.

Location:
trunk/source/cocoa-ide
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-editor.lisp

    r11906 r11917  
    2727(def-cocoa-default *use-screen-fonts* :bool t "Use bitmap screen fonts when available")
    2828
     29(def-cocoa-default *option-is-meta* :bool t "Use option key as meta?")
    2930
    3031(defgeneric hemlock-view (ns-object))
     
    908909  (let* ((view (hemlock-view self))
    909910         ;; quote-p means handle characters natively
    910          (quote-p (and view (hi::hemlock-view-quote-next-p view))))
     911         (quote-p (and view (hi::hemlock-view-quote-next-p view)))
     912         (flags (#/modifierFlags event)))
    911913    #+debug (log-debug "~&quote-p ~s event ~s" quote-p event)
    912     (if (or (null view)
    913             (#/hasMarkedText self)
    914             (and quote-p (zerop (#/length (#/characters event))))) ;; dead key, e.g. option-E
    915       (call-next-method event)
    916       (unless (eventqueue-abort-pending-p self)
    917         (let ((hemlock-key (nsevent-to-key-event event quote-p)))
    918           (when hemlock-key
    919             (hi::handle-hemlock-event view hemlock-key)))))))
     914    (cond ((and (not *option-is-meta*)
     915                (logtest #$NSAlternateKeyMask flags))
     916           (call-next-method event))
     917          ((or (null view)
     918               (#/hasMarkedText self)
     919               (and quote-p (zerop (#/length (#/characters event)))))
     920           (call-next-method event))
     921          ((not (eventqueue-abort-pending-p self))
     922           (let ((hemlock-key (nsevent-to-key-event event quote-p)))
     923             (when hemlock-key
     924               (hi::handle-hemlock-event view hemlock-key)))))))
    920925
    921926(defmethod hi::handle-hemlock-event :around ((view hi:hemlock-view) event)
  • trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/preferences.nib/info.nib

    r11466 r11917  
    88        <integer>4</integer>
    99        <key>IBOpenObjects</key>
    10         <array>
    11                 <integer>1500903</integer>
    12                 <integer>1500915</integer>
    13                 <integer>1500856</integer>
    14         </array>
     10        <array/>
    1511        <key>IBSystem Version</key>
    16         <string>9F33</string>
     12        <string>9G55</string>
    1713        <key>targetFramework</key>
    1814        <string>IBCocoaFramework</string>
Note: See TracChangeset for help on using the changeset viewer.