2017-05-30 16 views

回答

3

好的,我找到了。

看來,在方法installMouseDecodeTable 我需要交換甚至在Windows (我使用的是Windows 7,並且按鈕交換)

"Create a decode table that swaps the lowest-order 2 bits if not on Windows. 
This is to make right mouse button be the mouseButton2, i.e. open menus, and middle (wheel) button open halos (mouseButton3). 
See #processEvent:" 

如果我強迫開關DecodeTable位,交換位(例如使用僞平臺名稱,或者完全刪除測試),然後按鈕正常工作。

(您需要保存的圖像,關閉並重新打開程序)

ButtonDecodeTable _ Smalltalk platformName = 'Dummy' 
    ifTrue: [ ByteArray withAll: (0 to: 255) ] 
    ifFalse: [ 
     ByteArray withAll: 
      ((0 to: 255) collect: [ :ea | 
       ((ea bitAnd: 1) << 1 bitOr: (ea bitAnd: 2) >> 1) bitOr: (ea bitAnd: 252) ]) ] 
4

可以更改ButtonDecodeTable的形象,或者你可以告訴VM使用不同的鼠標映射。這取決於平臺:

  • 的Windows:切換在VM的*.ini文件3ButtonMouse設置,可以通過按F2或手動,見http://squeakvm.org/win32/settings.html
  • Unix的:通過命令行參數-swapbtn
  • 的Mac:編輯按鈕映射Info.plist
+0

太棒了!我已經看到了這個開關,但我還沒有理解它的功能。 –