📄 input.h
字号:
#define BTN_TOOL_PEN 0x140#define BTN_TOOL_RUBBER 0x141#define BTN_TOOL_BRUSH 0x142#define BTN_TOOL_PENCIL 0x143#define BTN_TOOL_AIRBRUSH 0x144#define BTN_TOOL_FINGER 0x145#define BTN_TOOL_MOUSE 0x146#define BTN_TOOL_LENS 0x147#define BTN_TOUCH 0x14a#define BTN_STYLUS 0x14b#define BTN_STYLUS2 0x14c#define BTN_TOOL_DOUBLETAP 0x14d#define BTN_TOOL_TRIPLETAP 0x14e#define BTN_WHEEL 0x150#define BTN_GEAR_DOWN 0x150#define BTN_GEAR_UP 0x151#define KEY_OK 0x160#define KEY_SELECT 0x161#define KEY_GOTO 0x162#define KEY_CLEAR 0x163#define KEY_POWER2 0x164#define KEY_OPTION 0x165#define KEY_INFO 0x166#define KEY_TIME 0x167#define KEY_VENDOR 0x168#define KEY_ARCHIVE 0x169#define KEY_PROGRAM 0x16a#define KEY_CHANNEL 0x16b#define KEY_FAVORITES 0x16c#define KEY_EPG 0x16d#define KEY_PVR 0x16e#define KEY_MHP 0x16f#define KEY_LANGUAGE 0x170#define KEY_TITLE 0x171#define KEY_SUBTITLE 0x172#define KEY_ANGLE 0x173#define KEY_ZOOM 0x174#define KEY_MODE 0x175#define KEY_KEYBOARD 0x176#define KEY_SCREEN 0x177#define KEY_PC 0x178#define KEY_TV 0x179#define KEY_TV2 0x17a#define KEY_VCR 0x17b#define KEY_VCR2 0x17c#define KEY_SAT 0x17d#define KEY_SAT2 0x17e#define KEY_CD 0x17f#define KEY_TAPE 0x180#define KEY_RADIO 0x181#define KEY_TUNER 0x182#define KEY_PLAYER 0x183#define KEY_TEXT 0x184#define KEY_DVD 0x185#define KEY_AUX 0x186#define KEY_MP3 0x187#define KEY_AUDIO 0x188#define KEY_VIDEO 0x189#define KEY_DIRECTORY 0x18a#define KEY_LIST 0x18b#define KEY_MEMO 0x18c#define KEY_CALENDAR 0x18d#define KEY_RED 0x18e#define KEY_GREEN 0x18f#define KEY_YELLOW 0x190#define KEY_BLUE 0x191#define KEY_CHANNELUP 0x192#define KEY_CHANNELDOWN 0x193#define KEY_FIRST 0x194#define KEY_LAST 0x195#define KEY_AB 0x196#define KEY_NEXT 0x197#define KEY_RESTART 0x198#define KEY_SLOW 0x199#define KEY_SHUFFLE 0x19a#define KEY_BREAK 0x19b#define KEY_PREVIOUS 0x19c#define KEY_DIGITS 0x19d#define KEY_TEEN 0x19e#define KEY_TWEN 0x19f#define KEY_DEL_EOL 0x1c0#define KEY_DEL_EOS 0x1c1#define KEY_INS_LINE 0x1c2#define KEY_DEL_LINE 0x1c3#define KEY_FN 0x1d0#define KEY_FN_ESC 0x1d1#define KEY_FN_F1 0x1d2#define KEY_FN_F2 0x1d3#define KEY_FN_F3 0x1d4#define KEY_FN_F4 0x1d5#define KEY_FN_F5 0x1d6#define KEY_FN_F6 0x1d7#define KEY_FN_F7 0x1d8#define KEY_FN_F8 0x1d9#define KEY_FN_F9 0x1da#define KEY_FN_F10 0x1db#define KEY_FN_F11 0x1dc#define KEY_FN_F12 0x1dd#define KEY_FN_1 0x1de#define KEY_FN_2 0x1df#define KEY_FN_D 0x1e0#define KEY_FN_E 0x1e1#define KEY_FN_F 0x1e2#define KEY_FN_S 0x1e3#define KEY_FN_B 0x1e4#define KEY_MAX 0x1ff/* * Relative axes */#define REL_X 0x00#define REL_Y 0x01#define REL_Z 0x02#define REL_RX 0x03#define REL_RY 0x04#define REL_RZ 0x05#define REL_HWHEEL 0x06#define REL_DIAL 0x07#define REL_WHEEL 0x08#define REL_MISC 0x09#define REL_MAX 0x0f/* * Absolute axes */#define ABS_X 0x00#define ABS_Y 0x01#define ABS_Z 0x02#define ABS_RX 0x03#define ABS_RY 0x04#define ABS_RZ 0x05#define ABS_THROTTLE 0x06#define ABS_RUDDER 0x07#define ABS_WHEEL 0x08#define ABS_GAS 0x09#define ABS_BRAKE 0x0a#define ABS_HAT0X 0x10#define ABS_HAT0Y 0x11#define ABS_HAT1X 0x12#define ABS_HAT1Y 0x13#define ABS_HAT2X 0x14#define ABS_HAT2Y 0x15#define ABS_HAT3X 0x16#define ABS_HAT3Y 0x17#define ABS_PRESSURE 0x18#define ABS_DISTANCE 0x19#define ABS_TILT_X 0x1a#define ABS_TILT_Y 0x1b#define ABS_TOOL_WIDTH 0x1c#define ABS_VOLUME 0x20#define ABS_MISC 0x28#define ABS_MAX 0x3f/* * Misc events */#define MSC_SERIAL 0x00#define MSC_PULSELED 0x01#define MSC_GESTURE 0x02#define MSC_RAW 0x03#define MSC_SCAN 0x04#define MSC_MAX 0x07/* * LEDs */#define LED_NUML 0x00#define LED_CAPSL 0x01#define LED_SCROLLL 0x02#define LED_COMPOSE 0x03#define LED_KANA 0x04#define LED_SLEEP 0x05#define LED_SUSPEND 0x06#define LED_MUTE 0x07#define LED_MISC 0x08#define LED_MAIL 0x09#define LED_CHARGING 0x0a#define LED_MAX 0x0f/* * Autorepeat values */#define REP_DELAY 0x00#define REP_PERIOD 0x01#define REP_MAX 0x01/* * Sounds */#define SND_CLICK 0x00#define SND_BELL 0x01#define SND_TONE 0x02#define SND_MAX 0x07/* * IDs. */#define ID_BUS 0#define ID_VENDOR 1#define ID_PRODUCT 2#define ID_VERSION 3#define BUS_PCI 0x01#define BUS_ISAPNP 0x02#define BUS_USB 0x03#define BUS_HIL 0x04#define BUS_BLUETOOTH 0x05#define BUS_ISA 0x10#define BUS_I8042 0x11#define BUS_XTKBD 0x12#define BUS_RS232 0x13#define BUS_GAMEPORT 0x14#define BUS_PARPORT 0x15#define BUS_AMIGA 0x16#define BUS_ADB 0x17#define BUS_I2C 0x18#define BUS_HOST 0x19/* * Values describing the status of an effect */#define FF_STATUS_STOPPED 0x00#define FF_STATUS_PLAYING 0x01#define FF_STATUS_MAX 0x01/* * Structures used in ioctls to upload effects to a device * The first structures are not passed directly by using ioctls. * They are sub-structures of the actually sent structure (called ff_effect) */struct ff_replay { __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */ __u16 delay; /* Time to wait before to start playing an effect */};struct ff_trigger { __u16 button; /* Number of button triggering an effect */ __u16 interval; /* Time to wait before an effect can be re-triggered (ms) */};struct ff_envelope { __u16 attack_length; /* Duration of attack (ms) */ __u16 attack_level; /* Level at beginning of attack */ __u16 fade_length; /* Duration of fade (ms) */ __u16 fade_level; /* Level at end of fade */};/* FF_CONSTANT */struct ff_constant_effect { __s16 level; /* Strength of effect. Negative values are OK */ struct ff_envelope envelope;};/* FF_RAMP */struct ff_ramp_effect { __s16 start_level; __s16 end_level; struct ff_envelope envelope;};/* FF_SPRING of FF_FRICTION */struct ff_condition_effect { __u16 right_saturation; /* Max level when joystick is on the right */ __u16 left_saturation; /* Max level when joystick in on the left */ __s16 right_coeff; /* Indicates how fast the force grows when the joystick moves to the right */ __s16 left_coeff; /* Same for left side */ __u16 deadband; /* Size of area where no force is produced */ __s16 center; /* Position of dead zone */};/* FF_PERIODIC */struct ff_periodic_effect { __u16 waveform; /* Kind of wave (sine, square...) */ __u16 period; /* in ms */ __s16 magnitude; /* Peak value */ __s16 offset; /* Mean value of wave (roughly) */ __u16 phase; /* 'Horizontal' shift */ struct ff_envelope envelope;/* Only used if waveform == FF_CUSTOM */ __u32 custom_len; /* Number of samples */ __s16 *custom_data; /* Buffer of samples *//* Note: the data pointed by custom_data is copied by the driver. You can * therefore dispose of the memory after the upload/update */};/* FF_RUMBLE *//* Some rumble pads have two motors of different weight. strong_magnitude represents the magnitude of the vibration generated by the heavy motor.*/struct ff_rumble_effect { __u16 strong_magnitude; /* Magnitude of the heavy motor */ __u16 weak_magnitude; /* Magnitude of the light one */};/* * Structure sent through ioctl from the application to the driver */struct ff_effect { __u16 type;/* Following field denotes the unique id assigned to an effect. * If user sets if to -1, a new effect is created, and its id is returned in the same field * Else, the user sets it to the effect id it wants to update. */ __s16 id; __u16 direction; /* Direction. 0 deg -> 0x0000 (down) 90 deg -> 0x4000 (left) 180 deg -> 0x8000 (up) 270 deg -> 0xC000 (right) */ struct ff_trigger trigger; struct ff_replay replay; union { struct ff_constant_effect constant; struct ff_ramp_effect ramp; struct ff_periodic_effect periodic; struct ff_condition_effect condition[2]; /* One for each axis */ struct ff_rumble_effect rumble; } u;};/* * Buttons that can trigger effects. Use for example FF_BTN(BTN_TRIGGER) to * access the bitmap. */#define FF_BTN(x) ((x) - BTN_MISC + FF_BTN_OFFSET)#define FF_BTN_OFFSET 0x00/* * Force feedback axis mappings. Use FF_ABS() to access the bitmap. */#define FF_ABS(x) ((x) + FF_ABS_OFFSET)#define FF_ABS_OFFSET 0x40/* * Force feedback effect types */#define FF_RUMBLE 0x50#define FF_PERIODIC 0x51#define FF_CONSTANT 0x52#define FF_SPRING 0x53#define FF_FRICTION 0x54#define FF_DAMPER 0x55#define FF_INERTIA 0x56#define FF_RAMP 0x57/* * Force feedback periodic effect types */#define FF_SQUARE 0x58#define FF_TRIANGLE 0x59#define FF_SINE 0x5a#define FF_SAW_UP 0x5b#define FF_SAW_DOWN 0x5c#define FF_CUSTOM 0x5d/* * Set ff device properties */#define FF_GAIN 0x60#define FF_AUTOCENTER 0x61#define FF_MAX 0x7f#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -