WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: using loadkmap and us.kmap  (Read 4264 times)

Offline netdisciple

  • Newbie
  • *
  • Posts: 2
using loadkmap and us.kmap
« on: March 19, 2010, 08:24:53 AM »
I want to disable Ctrl and Alt as early as possible.
I'm having trouble viewing the contents of the following file:

/usr/share/kmap/us.kmap

How can i view/edit this file?
I assume that i need to edit a few lines in this file, or create a new file and do loadkmap < filename in bootlocal.sh

i'm seeking the simplest and most stable solution. :)

(btw, i have successfully achieved an equivalent keyboard remap in X, i just need a little help with the console side of things so I can prevent someone from switching to another virtual terminal before X loads.)

« Last Edit: March 19, 2010, 08:29:04 AM by netdisciple »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: using loadkmap and us.kmap
« Reply #1 on: March 19, 2010, 08:41:25 AM »
By default there is only one vt, so they can't switch to another anyway.
The only barriers that can stop you are the ones you create yourself.

Offline netdisciple

  • Newbie
  • *
  • Posts: 2
Re: using loadkmap and us.kmap
« Reply #2 on: March 19, 2010, 10:10:17 AM »
Thanks for your response.

I will tell you more about why i want to do this, maybe you can tell me how to prevent it.

When tinycore is loading, if I press ctrl-alt-fn1, i can get X to stop loading and drop to a prompt.
I want to prevent that.

I was able to prevent the user from dropping back into a prompt from X by using `dumpkmap -pke > kmapfile`, editing it and doing a `loadkmap < somefile` from ~/.xession.

I HAVE found a way to prevent it, but it completed disables keyboard unfortunately once X loads.
`echo ::crtlaltfn: >> /etc/inittab`


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: using loadkmap and us.kmap
« Reply #3 on: March 19, 2010, 11:36:36 AM »
The way to create the binary keymaps is to load the "normal" one, and then dump it.

To do this, compile kbd, install temporarily, edit us.map.gz (or one of the maps it includes), "loadkeys us", "dumpkmap > us.kmap".
This new us.kmap will be your edited one.
« Last Edit: March 19, 2010, 11:46:05 AM by curaga »
The only barriers that can stop you are the ones you create yourself.