Module programming - keyboard layout
I'm developing a kernel module for didactic purposes, does anyone know a way to get the keyboard layout in use when the module is inserted?
|
# i'm unsure but i need this on debian to get into a "normal mode" so X11 takes essential to operation keystrokes
# i'm unsure how it works # but if your loading a special module that f's up the keyboard, then use lsmod to see if it's currently loaded? #!/bin/sh [ -x /bin/loadkeys ] && { [ -z "$1" ] && [ -s /etc/console/defkeymap_V1.0.kmap.gz ] && \ /bin/loadkeys -s /etc/console/defkeymap_V1.0.kmap.gz [ ! -z "$1" ] && [ -s $1 ] && /bin/loadkeys -s $1 } # make sure debian didn't make console unicode [ -x /usr/bin/kbd_mode ] && { /usr/bin/kbd_mode -a /usr/bin/kbd_mode } /bin/true # KBD_MODE(1) Linux User's Manual KBD_MODE(1) NAME kbd_mode - report or set the keyboard mode SYNOPSIS kbd_mode [ -auks ] it comes with "console tools", and the source may show you how it (talks with the kernel) |
keyboards have been known as a "security item" since the 80's (drivers also chips)
it's not really a toy for teaching. it should be code that is inspected to not allow breaches and operated on "well known chips". when you add in the factor "they expect it to be internationalized" but want to submit hacked code to do it. it's a disaster to support 2,000 languages. what i mean is: it's not an introductory topic that hacks should be submitting code changes to - not that your a hack. i'm saying using it as a teaching tool is not a great idea anyway are you doing this only when another kbd is attacheed? sounds like students could lock their keyboard and maybe damage their computer by forcing a reset |
Quote:
This module is in the context of an university project, and this is not really dangerous (insmod require super user permissions) |
All times are GMT -5. The time now is 07:41 PM. |