驱动小黑的红点+中键TrackPoint

 驱动小黑的红点+中键TrackPoint
http://blog.chinaunix.net/u/14165/showart_298024.html

用evdev作为X Server输入驱动的(ubuntu8。10)修改xorg的方式已经不可用。
可以采用下面的方法:
#sudo vi /etc/hal/fdi/policy/mouse-wheel.fdi
添加如下内容:






<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
    <device>
        <match key="info.product" string="TPPS/2 IBM TrackPoint">
            <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
            <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
            <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
            <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
            <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
        </match>
    </device>
</deviceinfo>


然后重启服务 hal 和 gdm 即可。
...init.d/hal gdm restart


Thinkpad的 红点+中键 可以滚屏,在很多发行版本默认下都不可用,
刚刚在 xorg.conf 里添加  
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
即可。参考:
http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在ArcEngine中使用Select Elements选择元素的步骤如下: 1. 获取MapControl或PageLayoutControl对象。 2. 创建一个新的SelectionEnvironment对象,并设置选择条件、符号等属性。 3. 调用MapControl或PageLayoutControl的ClearSelection方法,清空当前选择集。 4. 调用MapControl或PageLayoutControl的SelectByShape或SelectByPoint等方法,根据指定的几何图形或位置选择元素。 5. 遍历MapControl或PageLayoutControl的Selection集合,获取所选元素的ID号。 6. 根据ID号获取元素对象,执行相应操作。 以下是一个示例代码: ```C# // 获取MapControl对象 ESRI.ArcGIS.Controls.AxMapControl mapControl = this.axMapControl1; // 创建SelectionEnvironment对象 ESRI.ArcGIS.Carto.ISelectionEnvironment selectionEnv = new ESRI.ArcGIS.Carto.SelectionEnvironmentClass(); selectionEnv.CombinationMethod = ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew; selectionEnv.SelectionColor = GetRGBColor(255, 0, 0); // 设置选择符号颜色 // 清空当前选择集 mapControl.Map.ClearSelection(); // 创建选择几何图形并进行选择 ESRI.ArcGIS.Geometry.IPoint point = new ESRI.ArcGIS.Geometry.PointClass(); point.PutCoords(x, y); // 设置点的坐标 ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = mapControl.ActiveView.ScreenDisplay; double tolerance = screenDisplay.DisplayTransformation.FromPoints(5); // 设置选择容差 ESRI.ArcGIS.Display.IDisplayFeedback displayFeedback = new ESRI.ArcGIS.Display.RubberBandFeedbackClass(); displayFeedback.Display = screenDisplay; ESRI.ArcGIS.Geometry.IGeometry geometry = displayFeedback.TrackPoint(); // 获取选择几何图形 mapControl.Map.SelectByShape(geometry, selectionEnv, false); // 根据几何图形进行选择 // 遍历选择集合并获取元素对象 ESRI.ArcGIS.Carto.IEnumFeature enumFeature = (ESRI.ArcGIS.Carto.IEnumFeature)mapControl.Map.FeatureSelection; ESRI.ArcGIS.Geodatabase.IFeature feature; enumFeature.Reset(); while ((feature = enumFeature.Next()) != null) { // 根据ID号获取元素对象并执行操作 int featureID = feature.OID; ESRI.ArcGIS.Carto.IFeatureLayer featureLayer = (ESRI.ArcGIS.Carto.IFeatureLayer)mapControl.Map.get_Layer(0); ESRI.ArcGIS.Carto.IFeatureSelection featureSelection = (ESRI.ArcGIS.Carto.IFeatureSelection)featureLayer; ESRI.ArcGIS.Geodatabase.IQueryFilter queryFilter = new ESRI.ArcGIS.Geodatabase.QueryFilterClass(); queryFilter.WhereClause = "OBJECTID = " + featureID; ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureLayer.Search(queryFilter, false); ESRI.ArcGIS.Geodatabase.IFeature feature2 = featureCursor.NextFeature(); // 执行操作 // ... } ``` 在上述代码中,首先获取MapControl对象,并创建SelectionEnvironment对象,设置选择条件。然后调用MapControl的ClearSelection方法,清空当前选择集。接着创建选择几何图形,使用MapControl的SelectByShape方法进行选择。最后遍历选择集合,根据ID号获取元素对象,并执行相应操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值