2017-05-30 34 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

太棒了!我已经看到了这个开关,但我还没有理解它的功能。 –