- { T{ key-down f { S+ C+ } "HOME" } select-start-of-document }
- { T{ key-down f { S+ C+ } "END" } select-end-of-document }
-} define-command-map
+ ! { T{ key-down f ${ S+ os macosx? A+ C+ ? } "UP" } select-start-of-paragraph }
+ ! { T{ key-down f ${ S+ os macosx? A+ C+ ? } "DOWN" } select-end-of-paragraph }
+ { T{ key-down f ${ S+ os macosx? A+ C+ ? } "HOME" } select-start-of-document }
+ { T{ key-down f ${ S+ os macosx? A+ C+ ? } "END" } select-end-of-document }
+} os macosx? [ {
+ { T{ key-down f { S+ M+ } "LEFT" } select-start-of-line }
+ { T{ key-down f { S+ M+ } "RIGHT" } select-end-of-line }
+ ! { T{ key-down f ${ S+ M+ } "UP" } select-start-of-paragraph }
+ ! { T{ key-down f ${ S+ M+ } "DOWN" } select-end-of-paragraph }
+ { T{ key-down f { S+ M+ } "HOME" } select-start-of-document }
+ { T{ key-down f { S+ M+ } "END" } select-end-of-document }
+} append ] when define-command-map