# code_note **Repository Path**: hwzhangchuang/code_note ## Basic Information - **Project Name**: code_note - **Description**: Code note for save technical identifications. - **Primary Language**: C++ - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-06-13 - **Last Updated**: 2022-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # file explain ## 1. QueryAllKeyState.cpp Query the key states from one input node. ### how to use: 1. Find the keyboard event node, in my ubuntu virtual-machine, it is /dev/input/event1. 2. Change INPUT_NODE to your keyboard node. 3. Compile the code to an executable binary, run it. 2. While the binary running, push the keyboard key. such as the console output below, if I press "A", you will see KEY_A(30) is pressed, if press "B", KEY_B(48) is pressed. KEY_A,KEY_B is defined in "input-event-codes.h" ``` #####################Loop Query##################### KEY_IDX: 30 is set #####################Loop Query##################### KEY_IDX: 30 is set #####################Loop Query##################### KEY_IDX: 48 is set #####################Loop Query##################### KEY_IDX: 48 is set #####################Loop Query##################### ```