Skip to content

Commit

Permalink
Merge pull request #1988 from juliendelplanque/22668-Contextual-menu-…
Browse files Browse the repository at this point in the history
…does-not-show-up-when-pressing-Ctrlleft-click-on-Pharo-7

22668-Contextual-menu-does-not-show-up-when-pressing-Ctrlleft-click-on-Pharo-7
  • Loading branch information
MarcusDenker committed Nov 14, 2018
2 parents d66c4bc + e817118 commit b7e1ef8
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/System-VMEvents/InputEventSensor.class.st
Expand Up @@ -270,17 +270,18 @@ InputEventSensor >> keyboardPressed [
{ #category : #'private events' }
InputEventSensor >> mapButtons: buttons modifiers: anInteger [
"Map the buttons to yellow or blue based on the given modifiers.
If only the red button is pressed, then map
Ctrl-RedButton -> BlueButton.
Cmd-RedButton -> YellowButton.
If only the red button is pressed, then map
Ctrl-RedButton -> YellowButtonBit.
Cmd-RedButton -> BlueButtonBit.
"
(buttons = RedButtonBit)
ifFalse:[^buttons].
(anInteger allMask: CtrlKeyBit)
ifTrue:[^BlueButtonBit].
(anInteger allMask: CommandKeyBit)
ifTrue:[^YellowButtonBit].
^buttons

buttons = RedButtonBit
ifFalse: [ ^ buttons ].
(anInteger allMask: CtrlKeyBit)
ifTrue: [ ^ YellowButtonBit ].
(anInteger allMask: CommandKeyBit)
ifTrue: [ ^ BlueButtonBit ].
^ buttons
]

{ #category : #'private events' }
Expand Down

0 comments on commit b7e1ef8

Please sign in to comment.