PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 23, 2022

[FIXED] How to simulate press a key in linux kernel module?

 August 23, 2022     keypress, linux, linux-kernel, module     No comments   

Issue

How to simulate press a key in linux kernel module? I saw keybdev.c, but in my case I cant compile it `

error: implicit declaration of function ‘handle_scancode’

Maybe it's obsolete.


Solution

In the kernel, keyboards can call input_report_key which generates a keyboard event. The USB keyboard driver in /drivers/hid/usbhid/usbkbd.c is a good example of code to do both keyboard input and LED output.



Answered By - stark
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,214,620

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing