summaryrefslogtreecommitdiff
path: root/input/kbfiltr/README.md
diff options
context:
space:
mode:
authorBarry Golden <[email protected]>2019-09-05 20:18:16 -0700
committerGitHub <[email protected]>2019-09-05 20:18:16 -0700
commit22af24719daf72029a70119cc6653d2a3b940549 (patch)
tree6677b85dbdae81db047b97a51533ea356abb13e3 /input/kbfiltr/README.md
parent516d94ce47bd535dc813d654297ace02c61d46f6 (diff)
* Update README.md * Update README.md
Diffstat (limited to 'input/kbfiltr/README.md')
-rw-r--r--input/kbfiltr/README.md65
1 files changed, 26 insertions, 39 deletions
diff --git a/input/kbfiltr/README.md b/input/kbfiltr/README.md
index 90b59f79..6bbbe933 100644
--- a/input/kbfiltr/README.md
+++ b/input/kbfiltr/README.md
@@ -8,16 +8,6 @@ products:
- windows-wdk
---
-
-<!---
- name: Keyboard Input WDF Filter Driver (Kbfiltr)
- platform: KMDF
- language: cpp
- category: HID WDF
- description: A WDF example of a keyboard input filter driver.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620194
---->
-
# Keyboard Input WDF Filter Driver (Kbfiltr)
The Kbdfltr sample is an example of a keyboard input filter driver.
@@ -35,20 +25,18 @@ This driver filters input for a particular keyboard on the system. If you want t
This sample builds a Universal Windows Driver. It uses only APIs and DDIs that are included in OneCoreUAP.
-Set the hardware ID in the inx file
------------------------------------
+## Set the hardware ID in the inx file
This step is required for automatic deployment (described later) to work properly. In the kbfiltr.inx file (located with the driver source files), find the [DDK\_Ex.Mfg.NT\$ARCH\$] section. Change the hardware ID in the %DDK\_Ex% entry from the dummy value to the hardware ID of the PS/2 keyboard on the target computer. The following example shows the hardware ID change.
-```
+```INF
; For XP and above
[DDK_Ex.Mfg.NT$ARCH$]
;%DDK_Ex% = kbfiltr, *PNP0BAAD
%DDK_Ex% = kbfiltr, ACPI\VEN_PNP&DEV_0303
```
-Build the sample using Visual Studio
-------------------------------------
+## Build the sample using Visual Studio
In Visual Studio, on the **Build** menu, choose **Build Solution**.
@@ -56,33 +44,30 @@ For more information about using Visual Studio to build a driver package, see [B
The test application, *kbftest.exe* is also built as part of the solution under the 'exe' folder.
-Locate the built driver package
--------------------------------
+## Locate the built driver package
In File Explorer, navigate to the folder that contains your built driver package. The location of this folder varies depending on what you set for configuration and platform. For example, if your settings are **Debug** and **x64**, the package is your solution folder under \\Debug\\Package.
The package contains these files:
-File | Description
------|------------
-Kmdfsamples.cat | A signed catalog file, which serves as the signature for the entire package.
-kbfiltr.inf | An information (INF) file that contains information needed to install the driver.
-WdfCoinstaller010xx.dll | The coinstaller for version 1.xx of KMDF.
-kbfiltr.sys | The driver file.
+| File | Description |
+| --- | --- |
+| Kmdfsamples.cat | A signed catalog file, which serves as the signature for the entire package. |
+| kbfiltr.inf | An information (INF) file that contains information needed to install the driver. |
+| WdfCoinstaller010xx.dll | The coinstaller for version 1.xx of KMDF. |
+| kbfiltr.sys | The driver file. |
-Using MSBuild
--------------
+## Using MSBuild
As an alternative to building the Kbfiltr Filter Driver sample in Visual Studio, you can build it in a Visual Studio Command Prompt window. In Visual Studio, on the **Tools** menu, choose **Visual Studio Command Prompt**. In the Visual Studio Command Prompt window, navigate to the folder that has the solution file, kbfiltr.sln. Use the [MSBuild](http://go.microsoft.com/fwlink/p/?linkID=262804) command to build the solution. Here are some examples:
-**msbuild /p:configuration="Debug" /p:platform="x64" kbfiltr.sln**
+- **msbuild /p:configuration="Debug" /p:platform="x64" kbfiltr.sln**
-**msbuild /p:configuration="Release" /p:platform="Win32" kbfiltr.sln**
+- **msbuild /p:configuration="Release" /p:platform="Win32" kbfiltr.sln**
For more information about using [MSBuild](http://go.microsoft.com/fwlink/p/?linkID=262804) to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
-Run the sample
---------------
+## Run the sample
The computer where you install the driver is called the *target computer* or the *test computer*. Typically this is a separate computer from where you develop and build the driver package. The computer where you develop and build the driver is called the *host computer*.
@@ -92,16 +77,19 @@ The process of moving the driver package to the target computer and installing t
Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Configuring a Computer for Driver Deployment, Testing, and Debugging](http://msdn.microsoft.com/en-us/library/windows/hardware/).
-1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**.
-2. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, select the name of a target computer that you provisioned previously. Select **Install and Verify**, and choose **Default Driver Package Installation Task** in the list. Click **OK**.
-3. On the **Build** menu, choose **Deploy Package** or **Build Solution**.
+1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**.
+
+1. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, select the name of a target computer that you provisioned previously. Select **Install and Verify**, and choose **Default Driver Package Installation Task** in the list. Click **OK**.
+
+1. On the **Build** menu, choose **Deploy Package** or **Build Solution**.
### Manual deployment
Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment).
-1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\KbfiltrDriverPackage).
-2. On the target computer, open a Command Prompt window as Administrator. Navigate to your driver package folder, and enter the Devcon command with the correct hardware ID, such as:
+1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\KbfiltrDriverPackage).
+
+1. On the target computer, open a Command Prompt window as Administrator. Navigate to your driver package folder, and enter the Devcon command with the correct hardware ID, such as:
**Devcon install kbfiltr.inf ACPI\\VEN\_PNP&DEV\_0303**
@@ -109,14 +97,13 @@ Before you manually deploy a driver, you must turn on test signing and install a
Using Device Manager, update the driver for the PS/2 Keyboard by manually selecting kbfiltr.inf from the location where you copied the driver files.
-View the installed driver in Device Manager
--------------------------------------------
+## View the installed driver in Device Manager
On the target computer, in a Command Prompt window, enter **devmgmt** to open Device Manager. In Device Manager, on the **View** menu, choose **Devices by type**. In the device tree, locate **DDK Example Device that needs filtering** under the **Keyboards** node.
-Testing
--------
+## Testing
To use the test application provided with the sample, it must be copied to the target computer manually. Save the kbftest.exe file from the folder where the build result is placed (for example, exe\\Debug). This file is copied somewhere on the target, possibly where the driver package files are located. The test application is the executed on the target computer in a Command Prompt using **kbftest** as the command.
-**Tip** To avoid DLL dependencies for kbftext.exe, and the need to copy additional files, select the statically linked run-time library when building.
+> [!TIP]
+> Optional information to help a user be more successfulTo avoid DLL dependencies for kbftext.exe, and the need to copy additional files, select the statically linked run-time library when building.