[S] How to load another keymap in initramfs with busybox (loadkmap?)?

Loading programmers dvorak in initramfs with busybox.
Solution:
Download the keyboard map. Other keyboard maps you can usually find in "/usr/share/kbd/keymaps/"
wget https://raw.githubusercontent.com/jiangmiao/dvp/master/dvp.map
Now convert that map to the binary format that can be used with `loadkmap`. Make sure you run it with privileges, otherwise you'll get the "Couldn't get a file descriptor referring to the console" error
sudo loadkeys -b dvp.map > dvp.bmap
Now you can load that map in initramfs using `loadkmap`. I have a custom initramfs and init and here is the excerpt from it
#!/usr/bin/ash
echo "Starting the init script"
#mount things needed by this script
mount -t proc proc /proc
mount -t sysfs sysfs /sys
# and so on
echo "creating the symlinks to busybox"
/bin/busybox --install -s
echo "loading programmers dvorak"
loadkmap < dvp.bmap
Problem
I have a custom initramfs with Busybox in it. I want to load another keymap in there. Busybox has `loadkmap` utility, unfortunately it expects a binary file, so .map files don't fit in there. The goal is to load programmer's dvorak in busybox, but the problem is generic, because any ANSI .map format will not work with `loadkmap`.
The map for dvp is here: https://github.com/jiangmiao/dvp
Here it was talked about, but unfortunately the patch link is dead: http://mstempin.free.fr/index.php?2005/ … ry-keymaps
How to load a keymap in initramfs with busybox?
FTR, here is the quote from that blog post
Unfortunately, This is not a trivial task in Busybox, as it uses a special binary keymap file format for specifying the keymap to use.
The standard Linux way of handling keymaps is using the kbd utility package. This package contains most of the worldwide keyboard definitions in a keymap format. The two most usefull commands are the loadkeys and dumpkeys, which respectively loads an ASCII keymap file into the kernel's internal translation table and dumps this table to the standard output.
Unfortunately, the keymaps file format (see Linux manual (5) for keymaps) is difficult to parse ,as it requires a full lex/yacc parser to handle it :-(.
However, such a parser is included into loadkeys... And this utility also provides a -m option that generates a C-style output of the file...
After studying Busybox's binary keymap format in details, it appears to be no more than just a file dump of all key translation tables for each state (ie. plain, shifted, controlled, etc.), preceeded by a binary map of translation tables.
So, I decided to write a patch to the kbd package to add a -b option that provides a binary keymap dump capability to loadkeys. Here it is!
Last edited by SteveSapolsky (2014-12-19 12:39:13)

progandy wrote:
In archlinux loadkeys from core/kbd should allow you to generate a binary keymap.
loadkeys -b /your/key.map > key.bmap
Thank you. I updated my post and added the solution.

Similar Messages

  • How to load another page in a frame?

    Hi!
    I have a frame with a page where is a button. I need to load another page in the frame when I click the button. How can I make it on the ADF? I work on JDeveloper 10.1.3.4.

    I found example. Thank you for help. Refresh works very well! This code:
        protected void refreshPage(String refreshpage) {
            FacesContext fc = FacesContext.getCurrentInstance();
            ViewHandler ViewH = fc.getApplication().getViewHandler();
            UIViewRoot UIV = ViewH.createView(fc, refreshpage);
            UIV.setViewId(refreshpage);
            fc.setViewRoot(UIV);
        refreshPage("/transfers/ClaimForm.jspx");

  • How to load another internet browser (Curve 8330m)

    How do I go about loading another internet browser?  I downloaded the Opera Mini and tried to make it as the default browser but couldn't seem to get it to work properly.
    Can anyone point me to some documentation (nothing seems to be in the Blackberry Technical Solutions Center) or give me some step-by-step instructions on how to do this?

    LoboFan wrote:
    I do realize that.
    How can I get the browser to work?  Are there any steps I need to follow to use it instead of the Blackberry default?
    OK, sorry., I guess I misunderstood your initial question.
    So what is NOT working.. you've installed Opera Mini and you open to use it.. what happens?
    Details, please.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to load CD's on Netbook with no CD drive

    My wife just got a iPod shuffle. I installed iTunes on her Dell Netbook running Windows XP but can't figure out how to load her CD's since it doesn't have a CD drive. I've shared the CD on my laptop but it does not seem to expose it properly for either playing or copying.
    What are my options?
    Thanks

    put them on a removable hard drive or thumb drive and transfer the that way, as data.

  • How to load and unload same SWF with different xmlFilePath?

    I have a slideshow on my homepage and try to load and unload same instance with different xmlFilePath based on language on the same page.
    var flashvars = {
            xmlFilePath: escape("http://www.bodto.com.tr/kik.aspx"),
            xmlFileType: "OPML",
            lang: swfobject.getQueryParamValue("lang")    
            //initialURL: escape(document.location)   
          var params = {
            bgcolor: "#000000",  
            allowfullscreen: "true",
            wmode:"transparent",
            allowScriptAccess: "always"
          var attributes = {}
              swfobject.embedSWF("/swf/slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);
    Actionscript3
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Based on above informations, how could I achieve it?

    Suddenly that code in the following gives me some error
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Access of possibly undefined property LoaderInfo through a reference with static type flash.display:DisplayObject.
    The only code snippet works is
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    for (var param in paramObj) {
       if (param == "xmlFilePath") {
          my_ssp.xmlFilePath = paramObj[param];
       if (param == "xmlFileType") {
          my_ssp.xmlFileType = paramObj[param];

  • How to load a directory in JTree with Children(On expansion)

    Hi,
    How can I load a Jtree directory with children on expanding the node of that directory.
    I have developed the following SSCCE. Please explain in its context.
    My specific question is, when you execute the code given here, you can see the file bb.1 inside the directory bb.
    bb.1 is a dummy which I used while creating the Jtree. When I expand bb, instead of the leaf bb.1 , I want to display some other file name, say qq.1 or jj.1.
    What should I do?
    Hope my question is clear(http://forums.sun.com/thread.jspa?threadID=5337544&start=20&tstart=0 -- please ignore the given link).
    //FileTreeFrame.java
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.JFrame;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    public class FileTreeFrame extends JFrame {
      private JTree fileTree;
      private FileSystemModel fileSystemModel;
      public FileTreeFrame(String abc) {
        super("JTree FileSystem Viewer");
        // Build up your data
        List rootChildren = new ArrayList();
        rootChildren.add( new MyNode("aa") );
        List bbChildren = new ArrayList();
        bbChildren.add( new MyNode("bb.1") );
        rootChildren.add( new MyNode("bb", bbChildren) );
        rootChildren.add( new MyNode("cc") );
        MyNode rootNode = new MyNode("root", rootChildren);
        fileTree = new JTree(new FileSystemModel(new MyTreeNode(rootNode)));
        fileTree.setRootVisible(false);
        fileTree.setShowsRootHandles(true);
        getContentPane().add(fileTree);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(640, 480);
        setVisible(true);
      public static void main(String args[]) {
        new FileTreeFrame("");
    class FileSystemModel extends DefaultTreeModel {
        public FileSystemModel(DefaultMutableTreeNode node) {
              super(node);
        public boolean isLeaf(Object node) {
              MyTreeNode treeNode = (MyTreeNode)node;
              return !((MyNode)treeNode.getUserObject()).hasChildren();
    =======================================================
    //MyNode.java
    import java.util.List;
    public class MyNode {
          private String name;
          private List children;
          public MyNode(String name) {
                this.name = name;
          public MyNode(String name, List children) {
                this.name = name;
                this.children = children;
          public boolean hasChildren() {
                return children!=null && children.size()>0;
          public String toString() {
                return name;
          public List getChildren() {
                return children;
    =========================================================
    //MyTreeNode.java
    import java.util.Iterator;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class MyTreeNode extends DefaultMutableTreeNode {
        public MyTreeNode(MyNode node) {
            super(node);
            addSubNodes();
        private void addSubNodes() {
              MyNode content = (MyNode)getUserObject();
              if (content!=null && content.hasChildren()) {
                    for (Iterator it = content.getChildren().iterator(); it.hasNext();) {
                          add( new MyTreeNode((MyNode)it.next()) );
    }

    I believe JFileChooser has a method setFileSelectionMode() which will allow you to do this. You can configure the chooser to allow selection of FILES_ONLY, DIRECTORIES_ONLY or FILES_AND_DIRECTORIES.
    I have not used this myself but understand it will achieve what you need.

  • How to load a movieclip from libary with a button?

    Hi!
    I am kinda new to Flash and i have a queston.I made a
    movieclip that i keep in the libary. I have a button that i want to
    load the movieclip on the screen while pressing it. Queston is: how
    or what kind of code do i put for the button to load the movieclip
    wich is in my libary? As i see there is no simple soulution for
    this with the script assistent? I got the option load movie but it
    only loads external files or i get error messages when trying to
    load my movie.
    Please help me with this.
    /Tobias

    there are a few things you'll need to do in order to achieve
    this, but it's not to complicated. First right-click the MC in the
    Library and select 'properties', then in the 'Linkage' section
    select the check box 'Export for ActionScript' and the type a name
    in the 'Identifier' field, hit OK. now you can access the MC by the
    linkage ID.
    the next thing you will need to know is 'where' you want to
    place the MC, figure out the x,y position. then on the main
    timeline, handle the 'button' code and we'll use 'attachMovie' to
    bring the MC to the Stage. within the attachMovie method we'll also
    pass the position you've decided upon. so it would look something
    like this:

  • How to load turbotax on mac air with usb super drive

    i am trying to load turbo tax and cant get it to install.  i have a mac air and a usb superdrive. 

    I have TurboTax 2012 and have done it.  First, plug the SuperDrive into your USB port.  Then insert the TurboTax CD into the drive.  You will see the TurboTax icon and a folder icon representing your application folder on your desktop.  SImply drag the TurboTax icon over on top of the folder icon (as the arrow represents), let the action complete, and you will be done installing TurboTax!
    Finally, remember to eject the TurboTax disk from the SuperDrive before unplugging the drive from your USB port.  Depending on how you have Finder set up, you may have to hunt for the drive's icon.  It may be in Finder's sidebar.

  • How to access another computer's backups with Rescue and Recovery

    Hi all,
    I'm in the middle of a disaster. It is a long story, but basically, here is what I need to do now:
    My laptop was backing up to my NAS using Rescue and Recovery (R+R). I no longer have that laptop. How can I access those backups and retrieve files using another Lenovo PC now?
    Here's what I've tried on the Lenovo PC to access the laptop's backups:
    When I open Windows Explorer and go directly to the NAS, I can see the RRBackups folder and the directory structure, but all the files are like Data0, Data1, etc. So can't restore those.
    When I open R+R on my PC and try to restore individual files from Network, nothing shows, as if there are no backups on the NAS.
    When I press F11 and boot into R+R, I can see the Scheduled Backups on my NAS, but when I click on them to access individual files, they appear empty.
    Thanks for your help.

    bighill89, welcome to the forum,
    do you know which version of R&R was installed on the ThinkPad and did you by any chance create a cd?
    If there are version differences between the two systems there may be problems recovering data out of the backups, using a rescue cd may help. The only doubts I have here is whether or not the correct network driver will be present on the cd allowing you to access the NAS.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • How to load compressed tiff image formats with JIMI

    this method
    Image image=image = Jimi.getImage(imgResource);returns incorrect Image width & height (-1) for TIFF compressed formats.
    is there any jimi example showing how to properly load the tiff compressed image ?
    thanks.

    Wild guess: how old is JIMI technology? Has it been
    kept uptodate, or has
    it been abandoned? And is LZW compression in TIFF
    format a more recent feature?yes i checked jimi docs and here is what they say :
    TIFF      
    * Bi-level / Greyscale / Palette / True Color images
    * Uncompressed images
    * CCITT compressed Bi-level images with CCITT RLE, CCITT Group 3 1D Fax, CCITT Group 3 2D Fax, CCITT Group 4 Fax, CCITT Class F Fax
    * Packbits compressed images
    * LZW Compressed images
    * Tiled TIFF files
    * Handles all values of Orientation
    * TIFF / JPG compression variant
    * any color space except RGB
    * True Color images not of Red/Green/Blue format

  • How too add another iPhone to Maps with DIFFERENT iCloud accounts

    I went to this support article:  http://support.apple.com/kb/TS5293
    I want to send directions to my wife's iPhone BUT we have different iCloud IDs. 
    According to suppport article, both of us must have SAME iCloud ID.
    IS THERE A WAY AROUND THIS?
    I see my iPhone but not hers.  Both running latest iOs 7 software.
    Thank you

    Stealing is NOT the only reason to want to transfer music and paid apps from one account to another. 
    The family has been using one itunes account to purchase music and apps.  This account was set up under my user name.  I gave my wife my old ipad and got the 3-kids new ipads.  I want to give all of the music and apps under my user name to my wife's new itunes account so the family can keep using them and I can have a separate account.  Even if I have to re-pay for the music and apps. 
    Is it possible?

  • Does anyone know how to load a skin . swf file with video to dreamweaver

    I have input the video into flash cs3 and then used the
    properties section for adding the video in the source section. I
    then put the skin with the first drop down. I saved and just put it
    in dreamweaver however does not work.. I was told the skin may not
    have be sent automatically. How do we do this. Get the skin . swf
    file to go with the video or get them both into dreamweaver. I does
    not show up on my site.
    Site. www.tesoromp3.com
    thank phol

    I haven't seen too many questions like this on this forum.  Did you also try the photoshop forums?

  • How to show another table's field with LOV??

    Hi all!
    On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
    The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
    <jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
    <jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
    <jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
    So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
    Is there any possibility to handle this problem?!
    Thanks a lot!

    Hi all!
    On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
    The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
    <jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
    <jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
    <jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
    So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
    Is there any possibility to handle this problem?!
    Thanks a lot! PS: I'm using JDeveloper9i

  • How to access another resource in Groupwise

    Could anyone tell me or direct me to a sample of some code, that shows how to access another resource in Groupwise with VB.
    The main goal is to send a appointmentsfrom another resource by accessing this resource that you have authority from own mailaccount
    or from an account I have access to.
    This so far I have come:
    Dim objApp
    Dim objAccount As Account
    Dim objDraftMsg
    objApp = CreateObject("NovellGroupWareSession")
    ' objAccount = objAccount.ObjType.egwResource
    objAccount = objApp.Login("", "") 'My own account but want to access either the account that owns the resource or from my own
    ' objAccount = objApp.objtype.egwresource("Schema")
    objDraftMsg = objAccount.WorkFolder.Messages.Add("GW.MESSAGE.APP OINTMENT")
    Dim date1 As New Date(2013, 5, 2, 8, 30, 0)
    objDraftMsg.StartDate = date1
    objDraftMsg.Duration = 1.5 / 24 ' duration
    objDraftMsg.OnCalendar = True
    objDraftMsg.Subject.PlainText = "Testar schema" ' Subject
    objDraftMsg.BodyText.PlainText = "Hlsar Giggi" ' Body
    objDraftMsg.Recipients.Add("XX")
    objDraftMsg.Send()
    Thank you un advance
    Giggi

    On 4/30/2013 1:26 PM, giggi wrote:
    >
    > Could anyone tell me or direct me to a sample of some code, that shows
    > how to access another resource in Groupwise with VB.
    >
    > The main goal is to send a appointmentsfrom another resource by
    > accessing this resource that you have authority from own mailaccount
    >
    I don't have time to write code but as I recall you have to PROXY into
    the account. There's a proxy method IIRC that returns an Account from
    which you can send mail if you were granted rights to do so.

  • CSS - How to Load a script

    hello,
    I wonder if anybody can explain how to load a script to run with CSS 11050.
    many thanks
    Raquel

    Hi Raquel,
    Do you mean a custom script or one of the canned scripts that ship with the CSS ?
    If you want to load a custom script file, simply ftp to the CSS.
    Once connected to the CSS via FTP (you will be in the running code directory when you ftp into any CSS), CD to "script". Once in this directory, you can "put" the file into the directory. Do not use any file extensions here.
    Now, from the CSS cli, you can do a "script play filename" where filename is the name of your script. If you want to see what scripts are there (to see if your file is there correctly), do a "script play ?"
    If you need further direction, feel free to reply here. You can also have a look at the following link:
    http://www.cisco.com/univercd/cc/td/doc/product/webscale/css/css_500/advcfggd/appa.htm
    Regards
    Pete Knoops
    Cisco Systems

Maybe you are looking for

  • IChat, Parental Control and Bonjour

    Rather than using AIM (and it's slowness), I was hoping to be able to use Bonjour on our internal network (which is firewalled and, obviously, not a threat) to chat/audio conference with our youngest. I used the parental control to limit his AIM part

  • Ipod error - connecting to PC

    Hi there, this is the first time I have used this forum so bear with me. I recently wanted to transfer some tunes to my IPOD I connected the USB in the normal way, however, I got an error message " One of the USB devices attached to this computer has

  • O.T. For The Bakers Amongst You

    This new advert from Skoda that is currently airing on UK TV shows a Skoda Fabia car being made entirely from cake : http://xo.typepad.com/blog/2007/05/video_skoda_cak.html

  • Include Notes in printed output

    When I print photos using Print or Create (PSE4), I have the option to label the photos with various things, such as Caption, Date, etc. However, I have not found any way to print out the Notes that I have attached to the photos. Does anyone know of

  • "an unknown internal condition has occured" error msg in MAX; fieldpoint module

    Hi All, I'm trying to resolve repeated 33162 errors on my Labview system (looks like it's a problem communicating with fieldpoint modules). I ran the MAX program to try and browse the fieldpoint controllers in the remote systems node, clicking on sev