[SOLVED] Is there a nice way to map scancodes to keycodes without HAL?

So I've just upgraded to X.org 1.8 and don't need HAL anymore, except for one thing - mapping my extra keyboard keys. The only way to do this without HAL that I can find is by just sticking a bunch of setkeycodes commands in my /etc/rc.local, which seems pretty messy to me. I was wondering if something has replaced this functionality post-HAL (maybe udev), or has it just disappeared?
Last edited by PirateJonno (2010-06-22 09:01:41)

I think I figured out a way to do it using udev, and I'll update the wiki page once I've tested it a bit.
Edit: All done, so now I can disable my hal daemon (big boot speed improvement ). Unfortunately I can't uninstall yet since hal-cups-utils has only recently moved over, and some packages still depend on the ancient gnome-vfs
Last edited by PirateJonno (2010-06-22 10:11:32)

Similar Messages

  • HT1212 Is there any other way of unlocking my iPad 1 without deleting everything? (I haven't backed up in months!)

    Is ther any other way of unlocking my iPad 1 without backing up or recovering it? I haven't backed it up on my Cloud in months!!   What do I do?!

    Graaaaaahhhhhhh!!!!!!!!!!!

  • Is there an easy way of making DVDs using iMovie without iDVD?

    I can't seem to make / share / export a dvd in iTunes that can be read in a dvd player. The new operating system doesn't support iDVD so I can't easily make a dvd. I seem to be able to create a file with an m4v extesion and it looks great on my Macbook... only the Macbook.  I tried downloading two different conversion applications that could create an mp4 file but it isn't working and it is messy. Isn't there an easy way?
    Thanks, Brigid

    If you have an early 2011 MacBook Pro it would have come with Snow Leopard which did include iDVD.  If you upgraded to Lion iDVD will still be there.  Lion does support iDVD - i.e. it will still run on Lion.  It's just that Lion no longer includes iDVD if you get it on a brand new system.  So if iDVD is still there in your Applications folder it will still run under Lion.

  • Log windows - is there a nice way?

    How about scrolling windows in swing displaying the tail end of general output, log messages, exception stacktraces etc. etc..
    I've played with a TextArea with a Writer defined so that the write(char[] buf, int offset, int len)
    method does an append to it. But adding stuff to allow early output to drop off the buffer would be messy if the program was long-running.
    Anyone got a more elegant solution?

    a Jtable maybe more usefull (a column for hour, one for user, one for short message or error code, one for large message or exception.toString(), ...)
    else
    you can look for Log4j (Log For Java) over the internet
    i heard it is very usefull but i didn't tried it (but has it a GUI ?)

  • Is there a nice way to undeploy / redeploy applications

    How does one undeploy / redeploy applications without cycling the server and editing config.xml?
    And is it safe to delete .../applications/.wl_temp_do_not_delete when the server is not running?

    I'll look into this.
         -Don
    Brian Russell wrote:
    >
    Hi Don,
    When I "Install or Update an Application / Please locate an .ear, .jar, or .war file to install:" I get:
    java.io.EOFException: Unexpected end of ZLIB input stream
    at java.util.zip.ZipFile$1.fill(ZipFile.java:212)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:133)
    at java.io.FilterInputStream.read(FilterInputStream.java:93)
    at weblogic.j2ee.Component.retrieveComponent(Component.java:77)
    at weblogic.j2ee.Component.<init>(Component.java:43)
    at weblogic.j2ee.WebAppComponent.<init>(WebAppComponent.java:29)
    at weblogic.j2ee.Application.deploy(Application.java:126)
    at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:149)
    at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:127)
    at weblogic.j2ee.DeploymentListener.handleNotification(DeploymentListener.java:27)
    The original .ear is still open (Windows says "...sharing violation...in use..."), and the
    new version is NOT deployed (however a server stop / start works from this point).
    And what about UNdeploy? The "Deployed" checkbox does not appear to do anything
    when unchecked / Apply'd.
    Don Ferguson <[email protected]> wrote:
    Brian Russell wrote:
    How does one undeploy / redeploy applications without cycling the server and editing config.xml?
    And is it safe to delete .../applications/.wl_temp_do_not_delete when the server is not running?You should be able to copy ear/war/jar files in the applications directory,
    and the server will automatically deploy (or redeploy) them.
    -Don

  • Is there any easier way to multiclip different aspect ratios without exporting footage?

    I am using FCP Studio 3 and I have a 3 cam shoot with 3 different HD aspects - 1920x1080, 1440x1080 and 1280x1080 - is there a way to multiclip them without exporting and creating new clips?

    No.  You cannot make them into a multiclip if the files all have different frame sizes.  For Multiclip to work, the files need to match in every way possible...frame size, rate, codec. 
    But you can see what PluralEyes can do for you.  It will stack the video in layers, and match up the audio for you.

  • When using the "Books" app on my ipod touch, if I open one of my books there is no way to return to the library without stopping and restarting the app. What am I doing wrong?

    Once I open a book in my library there is no option to close it and return to the library. I must leave the app, stop the app and then restart it. How do I exit an opened book to return to my library without having to exit, stop, and restart the app?

    Assuming you are talking about "iBooks", then just
    tap the center of the screen
    and you should see a "Library" in the upper left corner of the screen.
    tap the center of the screen again,
    and you should return to full screen mode.
    if this is NOT iBooks, then I do not know what controls that app

  • Some how I have several duplicate photos, is there an easy way to get rid of them without deleting one at a time?

    Can I make Iphoto delete duplicate photos?

    Duplicate Annihalitor - http://brattoo.com/propaganda/ - or Decloner - http://www.pixelespressoapps.com/decloner/
    LN

  • Map scancodes to keycodes & udev rules

    I followed the wiki here and here. My keymap file /usr/lib/udev/keymaps/chicony-kb-9805:
    0xA0 www # 158 XF86WWW
    0xA3 close # 214 XF86Close
    0xB2 f13 # 191 XF86Tools
    0x92 f14 # 192 XF86Launch5
    0xB0 f15 # 193 XF86Launch6
    0xA1 f16 # 194 XF86Launch7
    0xAE previoussong # 173 XF86AudioPrev
    0xA4 stopcd # 174 XF86AudioStop
    0xA2 playpause # 172 XF86AudioPlay
    0x99 nextsong # 171 XF86AudioNext
    0xA6 volumeup # 123 XF86AudioRaiseVolume
    0x9E volumedown # 122 XF86AudioLowerVolume
    0x97 mute # 121 XF86AudioMute
    0xA5 sleep # 150 XF86Sleep
    I found my keyboard with $ /lib/udev/findkeyboards:
    AT keyboard: input/event0
    Then the command udevadm info -a -p $(udevadm info -q path -n /dev/input/event0) returns:
    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.
    looking at device '/devices/platform/i8042/serio0/input/input0/event0':
    KERNEL=="event0"
    SUBSYSTEM=="input"
    DRIVER==""
    looking at parent device '/devices/platform/i8042/serio0/input/input0':
    KERNELS=="input0"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="AT Translated Set 2 keyboard"
    ATTRS{phys}=="isa0060/serio0/input0"
    ATTRS{uniq}==""
    ATTRS{properties}=="0"
    looking at parent device '/devices/platform/i8042/serio0':
    KERNELS=="serio0"
    SUBSYSTEMS=="serio"
    DRIVERS=="atkbd"
    ATTRS{description}=="i8042 KBD port"
    ATTRS{bind_mode}=="auto"
    ATTRS{extra}=="0"
    ATTRS{force_release}=="369-370"
    ATTRS{scroll}=="0"
    ATTRS{set}=="2"
    ATTRS{softrepeat}=="0"
    ATTRS{softraw}=="1"
    ATTRS{err_count}=="0"
    looking at parent device '/devices/platform/i8042':
    KERNELS=="i8042"
    SUBSYSTEMS=="platform"
    DRIVERS=="i8042"
    looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    I can successfully load the keymap with # /lib/udev/keymap input/event0 chicony-kb-9805 but I can't get it loaded automatically with an udev rule. When I try to apply the keymap to device '/devices/platform/i8042/serio0/input/input0/event0' , It doesn't load (/etc/udev/rules.d/98-kb-9805.rules):
    SUBSYSTEM=="input", KERNEL=="event0", RUN+="/lib/udev/keymap input/$name chicony-kb-9805"
    Nor does it load when trying to apply to device '/devices/platform/i8042/serio0/input/input0':
    SUBSYSTEMS=="input", ATTRS{name}=="AT Translated Set 2 keyboard", RUN+="/lib/udev/keymap input/$name chicony-kb-9805"
    How should the udev rule file look like for it to work? Thanks.

    I think I figured out a way to do it using udev, and I'll update the wiki page once I've tested it a bit.
    Edit: All done, so now I can disable my hal daemon (big boot speed improvement ). Unfortunately I can't uninstall yet since hal-cups-utils has only recently moved over, and some packages still depend on the ancient gnome-vfs
    Last edited by PirateJonno (2010-06-22 10:11:32)

  • Is there a shorter way

    I have to calculate the price of a sandwich with the selected toppings
    Is there a shorter way to write the bereken_teBetalen method without changen code outside the method
    public class Topping {
         * Alle toppings zijn opgenomen in toppingWaarden.  Toevoeging van
         * een topping en overeenkomstige prijs geeft meteen een extra keuze
         * op overneekomstige schermen.
         * De prijzen zijn achtereenvolgens :
         *  2.0 voor basissandwich zonder topping
         *  + 0.5 voor kaas
         *  + 0.3 voor ham
         *  + 0.2 voor ananas
        String [] toppingsWaarden = {"kaas","ham","ananas"};
        double[] prijzen = {2.0,0.5,0.3,0.2};
        Map<String, Boolean> toppings;
        Topping(){
            toppings = new HashMap <String , Boolean>();
            for(int i= 0;i<2;i++){
                toppings.put(toppingsWaarden,false); }
    public boolean is(String topping) {
    return (toppings.get(topping)) ? true:false;
    * deze methode retourneert de mogelijke toppings als strings.
    public String[] getToppingsWaarden() {
    return toppingsWaarden;
    public void set(String topping,boolean gekozen){
    toppings.put(topping, gekozen);
    public double bereken_teBetalen() {
    double prijs=prijzen[0];
    if(is("kaas")) prijs+=prijzen[1];
    if(is("kaas")&&is("ham")) prijs+=prijzen[1]+prijzen[2];
    if(is("kaas")&&is("ham")&&is("ananas")) prijs+=prijzen[1]+prijzen[2]+prijzen[3];
    if(is("kaas")&&is("ananas")) prijs+=prijzen[1]+prijzen[3];
    if(is("ham")) prijs+=prijzen[2];
    if(is("ham")&&is("ananas")) prijs+=prijzen[2]+prijzen[3];
    if(is("ananas")) prijs+=prijzen[3];
    return prijs;
    public ImageIcon bepaalIcon(){
    String bestand = "sandwich images/brood";
    for (String s : toppings.keySet()) {
    if(toppings.get(s))
    bestand += s;
    bestand +=".jpg";
    return new ImageIcon(bestand);
    * Deze methode genereert de tekst overeenkomstige de gekozen sandwich
    * bv. : sandwich ham kaas
    public String toString(){
    return null;

    muckv wrote:
    I have to calculate the price of a sandwich with the selected toppings
    Is there a shorter way to write the bereken_teBetalen method without changen code outside the method
    if(is("kaas"))   prijs+=prijzen[1];
    if(is("kaas")&&is("ham")) prijs+=prijzen[1]+prijzen[2];
    if(is("kaas")&&is("ham")&&is("ananas")) prijs+=prijzen[1]+prijzen[2]+prijzen[3];
    if(is("kaas")&&is("ananas")) prijs+=prijzen[1]+prijzen[3];
    if(is("ham"))   prijs+=prijzen[2];
    if(is("ham")&&is("ananas"))   prijs+=prijzen[2]+prijzen[3];
    if(is("ananas"))   prijs+=prijzen[3];
    Definitely take previous advice, however, these two things are more or less equivalent (assuming there are no side-effects):
       if(is("kaas"))   prijs+=prijzen[1];
       if(is("kaas")&&is("ham")) prijs+=prijzen[1]+prijzen[2];
       if(is("kaas")&&is("ham")&&is("ananas")) prijs+=prijzen[1]+prijzen[2]+prijzen[3];and
    if ( is( "kaas" ) ) {
       prijs += prijzen[1];
       if( is( "ham" ) ) {
          prijs += prijzen[1] + prijzen[2];
          if ( is( "ananas" ) ) {
             prijs += prijzen[1] + prijzen[2] + prijzen[3];
    }But note that in both of the above cases, if you have cheese, ham, and pineapple (sorry I don't know your language, so that's just a guess--but I like Hawaiian pizza!), you will be charged prijzen[1] three times, prijzen[2] twice and prijzen[3] once. I'm guessing what you really intend to do is this:
    if ( is( "kaas" ) ) { prijs += prijzen[1]; }
    if ( is( "ham" ) ) { prijs += prijzen[2]; }
    if ( is( "ananas" ) ) { prijs += prijzen[3]; }And, as has been hinted, if you have a class called Topping (as you do), you really should just include a "price" attribute for the class, and add up the price that way.
    Edit: Apparently this is for a sandwich! I'm not sure I would like a Hawaiian sandwich.
    Edited by: endasil on 6-Jun-2008 12:48 PM

  • Is there an easy way to reimport all songs in my itunes folder?

    This may sound like a weird question but here goes... When I bring up my iTunes I have 8731 files (mostly music) that come to about 41.33G's but when I right click on my iTunes Music folder and select properties there are 8809 files and a total of 48.5G's. I am trying to free up some disk space and can't figure out why there is such a difference. I had issues with Norton 360 and removed it but I had to restore my music files from an external drive and when I did so I lost the links for music that I added after my last back-up. I noticed that TV shows I bought from Apple were not in my iTunes but I was able to locate them in the folder, and import them back into iTunes. I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts or a way to figure out which files may be duplicated in my iTunes Music folder. Seems like I am wasting 7G somewhere that I would like to recover. I already went through the duplicate songs and that didn't help. Any suggestions would be great...
    hp pc m260n   Windows XP   media center

    I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts
    AFIK there isn't an easy way of linking up to a lot of dead tracks and retaining play counts etc, except by finding the dead tracks and repairing each link individually. The only exception to this is if there is a simple error in the path that can be fixed by a search and replace on the xml library file, then rebuilding the library. However it doesn't sound as though that would be a solution for you.
    This MacMuse tip has a way of finding dead tracks if that helps.
    http://discussions.apple.com/thread.jspa?threadID=121967
    It is much simpler to sacrifice the playcount information and just reimport your iTunes Music folder. Then you can eliminate the dead tracks with a script. One of the forum members has written one that you can find here:
    http://home.comcast.net/~teridon73/itunesscripts/

  • I am looking to "move out" of my computer and into my wife's, is there an easy way to accomplish this task, keeping all my files and setting up a second user?

    I just bought a new external 3TB hard drive for this task and want to keep my items seperate from hers for both our sanity.
    I figured that I would do a time machine back up and use that to do the move part of things.
    But as to setting up the new user on her computer I am just not sure if I can "tell" the computer to only use the new drive for my stuff and only acces the new drive for all things related to that new profile.
    More then anything else I want to be able to say that all things that are hers have not been touched/acccesed/deleted by any of my actions. And that I am "confined" to the new drive.
    I hope this makes sence.
    Mr Geef

    I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts
    AFIK there isn't an easy way of linking up to a lot of dead tracks and retaining play counts etc, except by finding the dead tracks and repairing each link individually. The only exception to this is if there is a simple error in the path that can be fixed by a search and replace on the xml library file, then rebuilding the library. However it doesn't sound as though that would be a solution for you.
    This MacMuse tip has a way of finding dead tracks if that helps.
    http://discussions.apple.com/thread.jspa?threadID=121967
    It is much simpler to sacrifice the playcount information and just reimport your iTunes Music folder. Then you can eliminate the dead tracks with a script. One of the forum members has written one that you can find here:
    http://home.comcast.net/~teridon73/itunesscripts/

  • Is there an easy way to run an Ajax function from input type=file to test the file name in DB?

    I've had the <input type="file">  ... <cffile ...> thing going for a few years now. 
    There is a database where the uploaded file names are stored once the files are uploaded to the server.  It sees things in terms of problems and stores uploaded file name accordingly with the ProbID prepended onto the file name; e.g., MyPicture.jpg would end up in the designated directory and databawe as P416_MyPicture.jpg.  This allows user to store pictures with the same name in different problems without a conflict.  There has been an issue with certain characters (e.g., spaces, +, #, etc.) causing problems when they are in file names so we have come up with a way using the <cffile ... rename> to replace these chars with _.  This means that MyPic+.jpg would end up being P416_MyPic_.jpg. 
         This is where the problem appears.  If someone were to upload MyPic+.jpg after someone else uploaded MyPic_.jpg in the same problem, then the + file would overwrite the _ file before the system knew they had a problem.  And there is now way to restore the original file without going to the system backup and doing so – which is a whole other story … especially, if the person doesn’t tell anyone.
         The logical solution would be to be able to test the new final file name (the name after making the substitutions mentioned above) against the existing files in the database before you went from the page where the <input type=file> control to the associated _action.cfm page where the <cffile> object is located.  Given that this seems to be the province of Ajax, this would seem like a natural use of the really interesting technology.  I have can determine the file name from the onChange action on the <input type=File> so that this would be the place for Ajax to come to the rescue by looking up the final file name and then letting the user know whether the resultant name is a unique within the database or not.  If so, I'll just enable the Add button which sets right next to the <input > control and let them upload it.  If not, I'll put up an error message telling them that this file already exists in the system.
         This would be the perfect solution.  It would let me do some Ajax stuff like I've wanted to do for the past year, but never have had the time to do because this is the project that won't go away.  This is, in fact, the last thing of any consequence that remains to do on this 2-1/2 year nightmare – be careful what you wish for.  If I can get this done this week, then maybe I can finally take a weekend off … maybe it will finally come to an end.
         Which finally leads to my question:  I'm looking for some tips on how to get this thing going since I can barely spell Ajax.  I've got a book and looked at some stuff online about CF and Ajax, but a good example or two or three would be worth a day's worth of poking around on the web and in my books.
         Thanks in advance for any suggestions, ideas, help, whatever.
    Len

    Adam,
         Thank you for your suggestion, but, after spending the night working with Ben Forta's CF8, vol 2, Chap 34, working with <cfajaxproxy>, I was able to do exactly what I wanted and it appears, after some testing, to work exactly as I had envisoned it should. 
         I am now calling a JavaScript function (testFileName) from the onChage event on the <input type="file"> or Browse button, which calls my proxy.cfc that contains the server side of the equation.  This funciton testFileName (I've run out of cleaver function/file names).  The query contained therein hits the database to see if the passed in parameters can pull up an existing file.  If they do, the particulars (file name, data attahced, etc.) are returned to the JavaScipt procedure that puts up the error notice.  The user can then chose to either overwrite the file or quit.  Quiting leaves the your on the Attachment PopUp where he/she started with nothing being uploaded. 
         Thanks again for your suggestion.  I appreciate your taking the time to do so.
    Len

  • HT5622 I do not remeber the awnsers to my security questions, to change them, i need to know them which i do not.  Is there any possible way to change them, without knowing them.

    to purchas apps, and music. if you have not done it in a long time you have to hav the anwsers to your security questions.  i do not know the anwsers to mine, and there is no way to change them without knowing them.  if there is a way to change the security questions without knowing them i would really like to know how.

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email

  • Is there an easy way to replace fonts in Photoshop ?

    Is there an easy way to replace fonts in Photoshop without clicking on each text layer? We just got a new font system, so now our fonts don't match up. Looking for a fast/easy way to replace the fonts like in InDesign or Illustrator.

    Actually (You probably can guess what I’m driving at) Scripting could be used to automate such a task, but it would not really be »easy« unless one has some experience in the matter – if text-items contain a mixture of fonts it might even get kind of »complicated«.
    Still, depending on the quantity of files to be edited, the OP could try asking in the Scripting Forum if someone might not have a Script for something like this already …

Maybe you are looking for

  • What is this hidden "feature" in mobile Safari for and how can I use it?

    OK, one day, like any geek would, I was in the car messing with my iPod touch. I was playing in Safari, typing in email addresses and such to get the exciting "WARNING - PHISHING SITE" screen. So I then tried typing "/" into the address bar, and when

  • Itunes opening itself

    Itunes keeps opening itself on my macbookpro. I thought it might be the music sharing wirelessly. I changed my setting to no sharing, ended the program and turned off airport. A minute or so later the program was open again on my desktop. Has anyone

  • Evdre error

    Hi Gurus I have a input schedule which was working fine earlier 2 weeks ago. all of a sudden it says "evdre retrieving error from we server" . its the same input template that ran well before. only changes tha happened was upload of new version data

  • Not Send Calling Name

    Hi. I have PBX--Router GW --- AS5400XM --- Central Nokia (PGW in mode signaling and with SS7). The problem is when a call is originate of the PBX the Customer, the message that apreciate in the phone movil is "Private", We have reviewed the debugs th

  • Curve 9300 with BES 4.1.4.17

    We're doing tech support for a company who just changed their Blackberries to new Curves 9300. They currently haveand old  BES 4.1.4.17 installed. We can't get the phones to connect with their BES server. The old ones were working fine. Do they need