WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline netdisciple

  • Newbie
  • *
  • Posts: 2
using loadkmap and us.kmap
« on: March 19, 2010, 11: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, 11:29:04 AM by netdisciple »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: using loadkmap and us.kmap
« Reply #1 on: March 19, 2010, 11: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, 01:10:17 PM »
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: 11044
Re: using loadkmap and us.kmap
« Reply #3 on: March 19, 2010, 02:36:36 PM »
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, 02:46:05 PM by curaga »
The only barriers that can stop you are the ones you create yourself.