linux 带fn的键盘,Fn compact 蓝牙键盘,带有 TrackPoint-程序员宅基地

技术标签: linux 带fn的键盘  

FnLk switcher for ThinkPad Compact Keyboards with TrackPoint

The Lenovo Thinkpad Compact Keyboard with TrackPoint is a repackaging of a Thinkpad laptop keyboard into a stand-alone case with a Bluetooth wireless or cabled USB connection to the computer.following the current fashion, Lenovo has made the top row of keys serve two purposes, using them for both the traditional Fn keys and for"hotkeys"intended to control various functions such as volume and screen brightness.

Pressing FnLk (Fn+Esc) switches these keys between generating Fn keypresses and hotkey keypresses, but this mode change is handled not by the keyboard itself but by Lenovo's keyboard driver for Windows.

On the Bluetooth version of this keyboard the default mode is to generate hotkey keypresses; this package will help you make it generate Fn keypresses instead.(The USB keyboard has FnLk set by default and so starts out generating Fn keypresses. )

Pairing the Keyboard

The Bluetooth keyboard uses BT 2.1 Simple Secure Pairing (SSP), which should be supported by modern Linux distributions.several different utilities can be used to pair the keyboard.

If your distribution does not support SSP, or if you have problems pairing with SSP, you can try disabling it withhciconfig hci0 sspmode 0

bluetoothctl

Pairing can be done with the pair command.you should be prompted for the PIN code to type as part of the process.

bluetooth-wizard

Select the device (keyboard) and click"Continue".Watch for the PIN code in the hcidump window and enter that.

bluez-test-*

Versions of Bluez that ship with these scripts don't support SSP and thus don't report the PIN code the keyboard requires you to use.

To get around this, run the following in a separate console before you start pairing :sudo hcidump -at | grep -i passkey -A1

During the pairing process, you are looking out for lines like :> HCI Event: User Passkey Notification (0x3b) plen 10

bdaddr 90:7F:61:01:02:03 passkey 123456

In this case, 123456 is the PIN you need to enter.

Put the keyboard into discoverable mode by holding down the power button until the light starts flashing.then use hcitool scan to find out what the address of your keyboard is.it should resemble 90:7F:61:01:02:03.

Firstly, create the device :bluez-test-device create 90:7F:61:01:02:03

Then start trying to pair :bluez-simple-agent hci0 90:7F:61:01:02:03

You should see the passkey appear in the hcidump window.Type that passkey at the prompt (using a keyboard already connected to your computer) and press enter.you should now be paired.Finally :bluez-test-device trusted 90:7F:61:01:02:03 1

bluez-test-input connect 90:7F:61:01:02:03

Toggling FnLk

Linux 3.17 and Above

Linux kernels 3.17 and above (or any kernel with the kernel-patches applied) have built in support for the keyboards.this means all keys should work out the box, and you can control whether fn_lock is enabled by :echo 0>/sys/bus/hid/devices/*17EF:604*/fn_lock

The kernel can't currently switch fn_lock automatically for you, however you can use esekeyd to map KEY_FN_ESC to a script such as :{ grep -q 1/sys/bus/hid/devices/*17EF:604*/fn_lock && echo 0 || echo 1; }

>/sys/bus/hid/devices/*17EF:604*/fn_lock

...to toggle it.

Apple OS X (MacOS )

tpkb is a Mac userland tool similar to tp-compact-keyboard.it uses the cross-platform hidapi library.

Linux Pre-3.17

To use the keyboard in an older kernel, you have several options.from easiest to most difficult they are :Use the tp-compact-keyboard program supplied with this package.

Load a kernel module such as tp-compact-keyboard-backport.

Apply the patches in kernel-patch to the source code for your kernel and recompile it.

We cover only the first option here.

tp-compact-keyboard is a small utility to control some features of the keyboard, most importantly to enable FnLk.it works only with the Bluetooth keyboard, whilst the USB keyboard accepts the same commands but not in the same way, one has to tweak the hidraw ioctls which (AFAIK) can't be done in a Bash script.Requirements

This was developed under a Debian unstable kernel, 3.12 -1 -amd64, and has been reported to work on kernels as early as 3.10 (CentOS 7 ).however older kernels (3.6, for example) don't send the report; i'm not currently sure why.Using

To enable or disable FnLk on all connected ThinkPad Bluetooth keyboards, run./tp-compact-keyboard --fn-lock-enableor./tp-compact-keyboard --fn-lock-disable. the program has a few other functions as well, but they're not very useful on their own.have a look at the source.

I'm assuming what you really want to do is force FnLk on and forget about it though.to do this, do the following as root :mkdir/etc/udev/scripts

cp tp-compact-keyboard/etc/udev/scripts/tp-compact-keyboard

cp tp-compact-keyboard.rules/etc/udev/rules.d/tp-compact-keyboard.rules

Then udev will enable FnLk every time the keyboard is connected.other options

There are a few other options, however they are mostly useless without a custom kernel module handling the keyboard :--sensitivity xx

Set sensitivity of TrackPoint. xx is hex value 01--09 (although values

up to FF work).

--native-fn-enable

By default, F7/F9/F11 generate a string of keypresses that might be

useful under Windows. This stops this, and instead only generates

custom events.

--native-mouse-enable

The middle button generates 2 events by default, but Linux only

understands one of them. This disables the event that Linux does

understand, leaving you with no middle button.

--native-mouse-disable

Restore middle button to a working state.

Pair/unpair isn't enough to reset the keyboard, you need to power down the keyboard to get it back to it's original state.

how i did It

I worked out the custom commands by sniffing what the Windows driver did.first i set up a Windows XP virtual machine in KVM/QEMU and installed the drivers.then i disconnected the keyboard from my computer and ensured that the user running QEMU could write to the /dev/bus/usb node associated with my Bluetooth dongle.

Wireshark was readied for capture :# modprobe usbmon

# wireshark

Then, i let Windows use the Bluetooth dongle :(qemu) usb_add host:0a5c:217f

If you capture the whole association process then you should be able to view HID packets to/from the keyboard (filter for bthid ).the particuarly interesting ones here are the ones going to the keyboard.

Disassembling the Keyboard

The upper part of the keyboard case is just clipped on; run something around the seam on the underside of the keyboard to release it.the keyboard itself is fastened to the lower part of the case with double-sided tape.this is fastened strongly enough that attempting to detach the keyboard from the case would probably bend it irreprably.

Repairing the Trackpoint

Some users of the Bluetooth keyboard have found that the TrackPoint stops working whilst the rest of the keyboard is fine.this isn't a software issue; apparently the chip that controls the TrackPoint isn't correctly soldered down.

Replacement trackpoint caps

The keyboards use the"ThinkPad Low Profile TrackPoint Caps"(FRU 0 A33908 for a 10 -pack) by default.the original-size will fit also, but stick out more.this is fine for the cat-tongue, but with the others your finger can catch the edge.

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_39722196/article/details/116971967

智能推荐

react-native如何动态引用本地图片_react native 本地图片-程序员宅基地

文章浏览阅读1.6k次。最近很多人都在问如何去动态的加载本地图片,因为rn自带的require是不能拼接路径的。下面来教大家如何:1.新建一个项目,新建一个图片文件夹,如下所示:2.创建一个js文件,引入图片,输出模块:3.引用文件,并开始拼接:项目地址:GitHub - lvao813/img-demo这个只是一种封装的思想,希望能给大家带来启发。作者:目标全栈链接:https://www.jianshu.com/p/9612b5608183来源:简书著作权归作者所有..._react native 本地图片

SAP Fiori 应用无法根据 contact 字段搜索的原因分析_sap 2000 unable to find-程序员宅基地

文章浏览阅读1.1k次。Issue description: account 4024555 下面挂了一个contact 4098335:但是在Fiori ui上,根据Thompson搜索不出这个contact出来:Debug后台逻辑:Search bar里输入的Thompson作为substringof的参数传到后台,按照fullName搜索:https://sap.corp:4080/sap/opu/od..._sap 2000 unable to find

How to achieve conditional break point in your ABAP program_conditional breakpoint the left-hand side-程序员宅基地

文章浏览阅读243次。Background有不同的同事问我这个问题:例如LOOP要执行1000次,我只对其中的某一次比如第501次循环感兴趣,我肯定不可能按500次F5.或者我只对 LOOP里某个变量为某一个具体值的那一次循环感兴趣。如果避免重复按F5, 而是让断点直接停在我想停的condition上面?其实有三种方法实现。Line 15 will be executed 1000 times. And we ..._conditional breakpoint the left-hand side

干货丨什么是SOA架构?SOA架构有什么作用?-程序员宅基地

文章浏览阅读3k次,点赞3次,收藏3次。针对传统的单体架构存在的问题,后来出现了一种SOA架构。SOA架构是一个面向服务的架构,它是一个组件模型。SOA架构将应用程序的不同功能单元(称为服务)进行拆分,并通过在这些服务之间定义良..._soa架构

OpenCASCADE:建立Body_brepbuilderapi_makeface-程序员宅基地

文章浏览阅读741次。OpenCASCADE:建立BodyOpenCASCADE:建立Body棱镜轮廓应用圆角添加颈部创建空心实体OpenCASCADE:建立Body棱镜轮廓要计算瓶子的主体,您需要创建一个实体形状。最简单的方法是使用先前创建的轮廓并沿一个方向扫描它。Open CASCADE Technology的Prism功能最适合该任务。它接受一个形状和一个方向作为输入,并根据以下规则生成一个新的形状:您当前的个人资料是一条线。参考 Shape/Generates 表,您需要根据其线计算面以生成实体。要创建人脸,_brepbuilderapi_makeface

006 - 编译 QtWebEngine_编译qtwebengine-程序员宅基地

文章浏览阅读4.2k次。编译 QtWebEngine文章目录编译 QtWebEngine前言源码下载编译安装编译过程中可能遇到的问题参考文档前言在之前的文章《Linux 安装 Qt》中,我说了一句 QtWenEngine 模块不好编译,暂时用不到就不管,可没想到苍天饶过谁,这么快就需要用 QtWenEngine 了,能怎么办,编呗,接着编……源码下载之前的 qt 源码里面有 webengine 的源码编译安装根据官方文档,先安装依赖库;根据官方推荐安装的,咱也不知道对不对,主要是这玩意太难编译了,就宁可多装一千,不能_编译qtwebengine

随便推点

软考高级五大证书,哪个更值得考?_软考高级证书有哪些-程序员宅基地

文章浏览阅读1.6w次。软考高级有这五个证书:信息系统项目管理师、系统分析师、系统架构设计师、网络规划设计师、系统规划与管理师。只是专业方向不同,但是产生的作用都是一样的,具体的作用有升职加薪,职称评定,抵扣个税,还有积分落户等。所以没有更值得,只有更适合自己的科目,建议在学习备考有一些疑惑的友,加一些学习群,可以及时解决,也可以看到大家的学习进度,有兴趣的可以来企鹅群:423914346在纠结选什么高级科目的友,一起来看:..._软考高级证书有哪些

【Deep Linking】:从浏览器调起 APP_s.browser_fallback_url 没有作用-程序员宅基地

文章浏览阅读1.9k次。Deep Linking 只是一个概念, 是指通过一个链接进入另一个网站/App,并直接浏览其内部的某个页面。 Deep Linking 给用户带来的是非常顺滑的浏览体验,尤其在 Web 世界中 Deep Linking 的实现非常容易。但如果要进入 App 并定位到对应的页面则较为困难,URI Scheme, Universal Links, Android App Links, 以及 Chro_s.browser_fallback_url 没有作用

UE4学习-AI导航网格的创建及修改_unreal 导航网格编辑-程序员宅基地

文章浏览阅读4.8k次,点赞3次,收藏7次。文章目录_unreal 导航网格编辑

SAP Spartacus的Structured data_set-structured data.-程序员宅基地

文章浏览阅读399次。https://sap.github.io/spartacus-docs/structured-data/Structured Data provides a data structure for the web that makes the web content more understandable for web crawlers. With only HTML structure, a web page provides insufficient understanding of the co_set-structured data.

SAP ABAP BOR type-程序员宅基地

文章浏览阅读517次。Created by Wang, Jerry, last modified on Jan 06, 2017You might have observed that in both settype and relationship metadata table, there are type BUS1178 maintained. What is it?It is BOR type for ..._abap bor

PASCAL VOC Challenge_【pascal voc】ascalvocchallenges-程序员宅基地

文章浏览阅读1.2k次。http://grunt1223.iteye.com/blog/970449在计算视觉的领域中,Pascal VOC Challenge 就好比是数学中的哥德巴赫猜想一样。Pascal的全称是Pattern Analysis, Statical Modeling and Computational Learning。每年,该组织都会提供一系列类别的、带标签的图片,挑战者通过设计各种精妙的算_【pascal voc】ascalvocchallenges

推荐文章

热门文章

相关标签