• 人们迁移到NT从UNIX是用于具有控制关键的位置在哪里的帽子-锁定关键是在标准电脑的键盘,所以一个实用工具一样,这是我们最重要的编辑的福祉。

    Ctrl2cap,一个核心模式设备驾驶员,你可以过滤系统的键盘类驱动程序,以便转换帽-锁定符入控制符。

    安装Ctrl2cap运行命令"ctrl2cap/安装"从目录成为你已经拉开的Ctrl2cap文件。 卸载型"ctrl2cap/卸载"。 如果你是上运行的64位Windows运行ctrl2cap64.exe 代替。

    Ctrl2cap需要ntddkbd的。h从ddksrcinputinc目录,因此必须首先拷贝文件的ctrl2cap目录。 建立一个标准NT4驱动型"buildnt4"和建立一个Win2K波驱动型"buildnt5的"。 输出的文件都放在释放子目录。

    在NT4Ctrlcap实际上是相当微不足道的。 它只是重视自身的键盘类驱动程序,以便将抓住键盘读的请求。 对于每个请求,这个员额I/O完成回调,在这一点上,它需要一个偷看的scancode正在返回。 如果它发生的帽子-锁,ctrl2cap变成一个左控制。

    在Win2K Ctrl2cap是一个过滤波分驱动程序层在键盘类设备的堆上的键盘类设备。 这是相对于该Win2K信息适的kbfiltr例层本身之间的i8042港口设备和键盘类设备。 我选择层顶上的键盘类设备有以下几个原因:

    这意味着Ctrl2cap IRP_MJ_READ拦截和操作码之间共享NT4和Win2K版本。

    我不需要提供一个INF文件和有用户通过设备的管理安装Ctrl2cap-我只是修改适当登记册的价值(键盘类设备的HKLMSystemCurrentControlSetControlclass上边值)。 看看源代码Ctrl2cap.exe 更多的信息。

    的缺点在我办法(以及这一优点或缺点,这取决于你的观点):

    因为我没有安装一个INF文件通过的设备管理器,用户不是警告说,Ctrl2cap驱动程序文件没有数字签名。 在这一特定情况下,我认为,优点胜过缺点。 然而,在你的模型Win2K键盘上的过滤器Ctrl2cap我强烈建议你研究的kbfiltr例从Win2K信息适用。 Kbfiltr的拦截点的关键输入序列使得它很容易kbfiltr注射击键输入流的东西,就会更难以使用的Ctrl2cap源基础。

  • है कि लोगों के लिए चले गए NT यूनिक्स से इस्तेमाल कर रहे हैं करने के लिए नियंत्रण कुंजी स्थित है, जहां कैप्स लॉक कुंजी है पर मानक पीसी कीबोर्ड, तो एक उपयोगिता के इस तरह के लिए आवश्यक है हमारे संपादन अच्छी तरह से किया जा रहा है ।

    के साथ Ctrl2cap, एक कर्नेल-मोड डिवाइस ड्राइवर, आप कर सकते हैं फ़िल्टर प्रणाली के कुंजीपटल क्लास ड्रायवर के क्रम में परिवर्तित करने के लिए कैप्स-लॉक पात्रों में नियंत्रण वर्ण.

    स्थापित Ctrl2cap चल रहा है कमांड "ctrl2cap /स्थापित करें" से निर्देशिका में जो आप unzipped Ctrl2cap फ़ाइलें. स्थापना रद्द करने के लिए प्रकार "ctrl2cap /स्थापना रद्द करें". यदि आप चल रहे हैं पर 64-बिट Windows चलाने ctrl2cap64.exe के बजाय.

    Ctrl2cap की आवश्यकता है ntddkbd.घंटा की रफ्तार से ddksrcinputinc निर्देशिका है, तो आप पहले की नकल है कि फाइल करने के लिए ctrl2cap निर्देशिका. का निर्माण करने के लिए एक मानक NT 4 ड्राइवर प्रकार "buildnt4" और के निर्माण के लिए एक Win2K WDM चालक प्रकार "buildnt5". आउटपुट फाइल में रखा जाता रिहाई उपनिर्देशिका.

    पर NT 4 Ctrlcap वास्तव में काफी तुच्छ है । यह बस देता ही करने के लिए कुंजीपटल क्लास ड्रायवर इतना है कि यह पकड़ा जाएगा कीबोर्ड पढ़ने का अनुरोध करता है । प्रत्येक अनुरोध के लिए, यह पोस्ट एक मैं/ओ पूरा होने कॉलबैक, जो बिंदु पर यह लेता है पर एक तिरछी नज़र scancode जा रहा है कि लौट आए । अगर यह होता है के लिए एक कैप्स-लॉक, ctrl2cap में यह परिवर्तन एक छोड़ दिया है-नियंत्रण ।

    पर Win2K Ctrl2cap एक WDM फ़िल्टर ड्रायवर कि परतों में कुंजीपटल क्लास डिवाइस के ढेर के ऊपर कुंजीपटल क्लास डिवाइस है । इस के विपरीत है Win2K DDK के kbfiltr उदाहरण है कि परतों खुद के बीच i8042 पोर्ट डिवाइस और कुंजीपटल क्लास डिवाइस है । मैं करने के लिए चुना परत के शीर्ष पर कुंजीपटल क्लास डिवाइस के लिए कई कारण हैं:

    इसका मतलब यह है कि Ctrl2cap IRP_MJ_READ अवरोधन और हेरफेर कोड साझा किया जाता है के बीच NT 4 और Win2K संस्करणों.

    मैं की जरूरत नहीं है की आपूर्ति करने के लिए एक INF फ़ाइल और उपयोगकर्ता के माध्यम से जाने के लिए डिवाइस प्रबंधक स्थापित Ctrl2cap - मैं बस को संशोधित उपयुक्त रजिस्ट्री मान (कुंजीपटल क्लास डिवाइस के HKLMSystemCurrentControlSetControlclass UpperFilters मान). स्रोत कोड को देखने के लिए Ctrl2cap.exe अधिक जानकारी के लिए.

    नुकसान के साथ मेरा दृष्टिकोण है (और यह एक फायदा है या नुकसान के आधार पर देखने की अपनी बात से):

    क्योंकि मैं नहीं के साथ स्थापित एक INF फ़ाइल के माध्यम से डिवाइस प्रबंधक, उपयोगकर्ता नहीं है चेतावनी दी है कि Ctrl2cap ड्राइवर फ़ाइल नहीं है डिजिटल Microsoft द्वारा हस्ताक्षरित है । इस विशेष मामले में, मैं महसूस किया है कि लाभ को नुकसान पल्ला झुकना. हालांकि, इससे पहले कि आप मॉडल एक Win2K कीबोर्ड पर फ़िल्टर Ctrl2cap मैं दृढ़ता से सुझाव है कि आप का अध्ययन kbfiltr उदाहरण से Win2K DDK. Kbfiltr के अवरोधन बिंदु में महत्वपूर्ण इनपुट अनुक्रम बनाता है यह बहुत आसान के लिए kbfiltr इंजेक्षन करने के लिए कीस्ट्रोक्स में इनपुट स्ट्रीम, कुछ है कि और अधिक कठिन हो जाएगा का उपयोग कर Ctrl2cap स्रोत का आधार है ।

  • People that migrated to NT from UNIX are used to having the control key located where the caps-lock key is on the standard PC keyboard, so a utility like this is essential for our editing well-being.

    With Ctrl2cap, a kernel-mode device driver, you can filter the system's keyboard class driver in order to convert caps-lock characters into control characters.

    Install Ctrl2cap running the command "ctrl2cap /install" from the directory into which you've unzipped the Ctrl2cap files. To uninstall type "ctrl2cap /uninstall". If you are running on 64-bit Windows run ctrl2cap64.exe instead.

    Ctrl2cap requires ntddkbd.h from the ddksrcinputinc directory, so you must first copy that file to the ctrl2cap directory. To build a standard NT 4 driver type "buildnt4" and to build a Win2K WDM driver type "buildnt5". Output files are placed in the release subdirectory.

    On NT 4 Ctrlcap is actually quite trivial. It simply attaches itself to the keyboard class driver so that it will catch keyboard read requests. For each request, it posts an I/O completion callback, at which point it takes a peek at the scancode that is being returned. If it happens to be a caps-lock, ctrl2cap changes it into a left-control.

    On Win2K Ctrl2cap is a WDM filter driver that layers in the keyboard class device's stack above the keyboard class device. This is in contrast to the Win2K DDK's kbfiltr example that layers itself between the i8042 port device and the keyboard class device. I chose to layer on top of the keyboard class device for several reasons:

    It means that the Ctrl2cap IRP_MJ_READ interception and manipulation code is shared between the NT 4 and Win2K versions.

    I don't need to supply an INF file and have the user go through the Device Manager to install Ctrl2cap - I simply modify the appropriate Registry value (the keyboard class devices's HKLMSystemCurrentControlSetControlClass UpperFilters value). See the source code to Ctrl2cap.exe for more information.

    The disadvantage of my approach is (and this an advantage or disadvantage depending on your point of view):

    Because I don't install with an INF file via the Device Manager, the user is not warned that the Ctrl2cap driver file is not digitally signed by Microsoft. In this particular case I felt that the advantages outweigh the disadvantages. However, before you model a Win2K keyboard filter on Ctrl2cap I strongly suggest that you study the kbfiltr example from the Win2K DDK. Kbfiltr's interception point in the key input sequence makes it very easy for kbfiltr to inject keystrokes into the input stream, something that would be more difficult using the Ctrl2cap source base.