equal
deleted
inserted
replaced
4419 untranslatedKey := Character value:untranslatedKeyArg |
4419 untranslatedKey := Character value:untranslatedKeyArg |
4420 ] ifFalse:[ |
4420 ] ifFalse:[ |
4421 untranslatedKey := untranslatedKeyArg |
4421 untranslatedKey := untranslatedKeyArg |
4422 ]. |
4422 ]. |
4423 |
4423 |
4424 "/ Timestamp now print. 'X: ' print. untranslatedKey printCR. |
4424 "/ Timestamp now print. 'X: ' print. untranslatedKey printCR. |
4425 |
4425 |
4426 "/ |
4426 "/ |
4427 "/ ctrl-Esc gives up focus |
4427 "/ ctrl-Esc gives up focus |
4428 "/ |
4428 "/ |
4429 untranslatedKey == #Escape ifTrue:[ |
4429 untranslatedKey == #Escape ifTrue:[ |
4450 "/ ^ self. |
4450 "/ ^ self. |
4451 "/ ]. |
4451 "/ ]. |
4452 "/ |
4452 "/ |
4453 aView sensor keyPress:untranslatedKey x:x y:y view:aView |
4453 aView sensor keyPress:untranslatedKey x:x y:y view:aView |
4454 |
4454 |
4455 "Modified: / 04-10-2011 / 19:32:52 / cg" |
4455 "Modified (format): / 12-07-2012 / 18:37:40 / cg" |
4456 ! |
4456 ! |
4457 |
4457 |
4458 keyRelease:untranslatedKeyArg x:x y:y view:aView |
4458 keyRelease:untranslatedKeyArg x:x y:y view:aView |
4459 "forward a key-release event for some view" |
4459 "forward a key-release event for some view" |
4460 |
4460 |
6694 ! |
6694 ! |
6695 |
6695 |
6696 prependModifierToKey:untranslatedKey |
6696 prependModifierToKey:untranslatedKey |
6697 |xlatedKey s modifier| |
6697 |xlatedKey s modifier| |
6698 |
6698 |
6699 xlatedKey := untranslatedKey. |
6699 (ctrlDown and:[ metaDown ]) ifTrue:[ |
|
6700 "/ right-ALT: already xlated (I hope) |
|
6701 ^ untranslatedKey |
|
6702 ]. |
|
6703 |
|
6704 xlatedKey := untranslatedKey. |
6700 xlatedKey isCharacter ifFalse:[ |
6705 xlatedKey isCharacter ifFalse:[ |
6701 xlatedKey := xlatedKey asSymbol |
6706 xlatedKey := xlatedKey asSymbol |
6702 ]. |
6707 ]. |
6703 |
6708 |
6704 modifier := self modifierKeyTranslationFor:untranslatedKey. |
6709 modifier := self modifierKeyTranslationFor:untranslatedKey. |
6744 ]. |
6749 ]. |
6745 ]. |
6750 ]. |
6746 |
6751 |
6747 ^ xlatedKey |
6752 ^ xlatedKey |
6748 |
6753 |
6749 "Modified (format): / 05-10-2011 / 13:51:49 / cg" |
6754 "Modified (format): / 12-07-2012 / 18:37:22 / cg" |
6750 ! |
6755 ! |
6751 |
6756 |
6752 translateKey:untranslatedKey forView:aView |
6757 translateKey:untranslatedKey forView:aView |
6753 "Return the key translated via the translation table. |
6758 "Return the key translated via the translation table. |
6754 Your application program should never depend on the values returned |
6759 Your application program should never depend on the values returned |
6775 |
6780 |
6776 "/ translate via keyboardMap |
6781 "/ translate via keyboardMap |
6777 |
6782 |
6778 xlatedKey := aView keyboardMap valueFor:xlatedKey. |
6783 xlatedKey := aView keyboardMap valueFor:xlatedKey. |
6779 xlatedKey notNil ifTrue:[ |
6784 xlatedKey notNil ifTrue:[ |
6780 xlatedKey isCharacter ifFalse:[ |
6785 xlatedKey isCharacter ifFalse:[ |
6781 xlatedKey bitsPerCharacter == 8 ifTrue:[ |
6786 xlatedKey bitsPerCharacter == 8 ifTrue:[ |
6782 xlatedKey := xlatedKey asSymbol |
6787 xlatedKey := xlatedKey asSymbol |
6783 ] |
6788 ] |
6784 ] |
6789 ] |
6785 ]. |
6790 ]. |
6786 ^ xlatedKey |
6791 ^ xlatedKey |
6787 |
6792 |
6788 "Modified: 28.2.1996 / 17:12:16 / cg" |
6793 "Modified: / 12-07-2012 / 18:37:47 / cg" |
6789 ! ! |
6794 ! ! |
6790 |
6795 |
6791 !DeviceWorkstation methodsFor:'keyboard queries'! |
6796 !DeviceWorkstation methodsFor:'keyboard queries'! |
6792 |
6797 |
6793 altDown |
6798 altDown |
8135 ! ! |
8140 ! ! |
8136 |
8141 |
8137 !DeviceWorkstation class methodsFor:'documentation'! |
8142 !DeviceWorkstation class methodsFor:'documentation'! |
8138 |
8143 |
8139 version |
8144 version |
8140 ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.567 2012-04-25 19:06:51 stefan Exp $' |
8145 ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.568 2012-07-12 16:43:32 cg Exp $' |
8141 ! |
8146 ! |
8142 |
8147 |
8143 version_CVS |
8148 version_CVS |
8144 ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.567 2012-04-25 19:06:51 stefan Exp $' |
8149 ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.568 2012-07-12 16:43:32 cg Exp $' |
8145 ! ! |
8150 ! ! |
8146 |
8151 |
8147 DeviceWorkstation initialize! |
8152 DeviceWorkstation initialize! |