[SOLVED] Xmodmap question...

Hi,
I'm trying to use 'xmodmap' so i can map 'ESCAPE' to work as ALT+F4 (close window). Google'd it a lot without success..
Anyone know if its possible ?
BTW: I know i can easily do this under GNOME/KDE, but i need to use xmodmap.
TIA
Last edited by spunkiie (2011-03-03 15:27:24)

Not sure if xmodmap can be used to make <escape> work like Alt + another key, though you could make <escape> work like Alt OR make it work like another key.
BUT, at least in XFCE, it is possible to redefine they keys which do commands like closing windows. One place is in settings > keyboard > application shortcuts.
The other place is settings > window manager > keyboard, and here you can specify what keys will close a window, etc.
Here are some things I found useful for xmodmap, but this may not be relevant to what you want to do.
First, a good source of info = the man pages for xmodmap, i.e. type
man xmodmap
Once you have modified the keymap with commands in a file called (say) .xmodrc, you can load it at each boot, or load it for the current session by typing the command in a console. I use a command like this in my .xinitrc file:
xmodmap ~/.xmodrc
Also useful: xmodmap -pke, xmodmap -pm (for modifier map) to see current mappings & modifier map. If you save the output from these, "diff" is useful for finding differences.
Clarification: these are two separate commands, like this:
xmodmap -pke
#output deleted
xmodmap -pm
For changing alt- keys, you may have to change the modifier map, perhaps like this:
clear mod1
#and later, after modifying bindings:
add mod1 = Alt_L
add mod1 = Alt_R
You can use xev to check key bindings.
Generally, I find it less confusing to use the "keycode" command rather than keysyms.
Last edited by btitus (2011-03-01 13:44:10)

Similar Messages

  • How to undo "This solved my question" on this Using iPhone forum?

    How to undo "This solved my question" on this "Using iPhone" forum?
    new to this forum... how do you undo this?

    **** lol, In that case they should give a warning or some type of "You sure?" yes/no. I clicked completely by mistake. anyways...

  • Can't mark reply "This solved my question"

    In the email I received that notified me of a reply to my question, when I click on the link for either "This solved my question" or "This helped me", it takes me to Safari, but gives me the following:
    Apple Support Communities
    Unauthorized
    It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    If I sign in to the Discussions, and go to Your Stuff and choose the question, I see the Legend, but there are no buttons for me to mark a reply as "This solved my question" or "This helped me". 
    Any idea why I can't do this?  I'm running Mac OS 10.8.5, and Safari 6.0.5.  Could there be something in my Safari settings that is blocking this?
    Thanks,
    Marcia Bolsinga

    There have also been intermittent problems with the forum software lately and this might be causing this problem.
    Try going to your thread again and see if the symptoms change any,

  • Help me for solve this Question this is my problem

    help me for solve this Question this is my problem
    i installed EBS 11i fresh not vision
    i did cart of account and did set of book
    then assigned it with profile option gl set of books name
    and when enter to make ajournal appeare this messege
    [http://www9.0zz0.com/2009/10/06/03/232202588.jpg]
    [http://www9.0zz0.com/2009/10/06/03/634050066.jpg]

    Hi,
    Not sure why are you getting this kind of error (which is pointing to a URL with Jpg file) while creating a journal.
    Could you please bounce your server once and try..
    Please let us know if the error/warning stopping you to enter a journal in GL??
    We don't think profile option is a show stopper here.... We assume that you have assigned Sets of Books, MO: Operating unit & HR USer Profile option at Responsibility level correctly....
    Regards,
    S.P DASH

  • I am trying to use the "This solved my question - 10 points" and the "This helped me - 5 points" but they are NOT doing anything. How do I award the points ?

    I am trying to use the "This solved my question - 10 points" an the "This helped me - 5 points" but they are NOT doing anything. How do I award the points ?

    Are you talking about the "Legend" panel at the right of the window?
    Those text are just help texts explaining the reputation points. You can only award points, if you are the original poster of a question. Then you will see active buttons to award points below the answers you receive. See here for more information: https://discussions.apple.com/static/apple/tutorial/reputation.html
    Regards
    Léonie

  • How do I uncheck "This solved my question" on the Apple Support Communities forum?

    I checked an answer as "this solved my problem" when it actually did not, and I don't want anyone to be mislead.
    How do I uncheck "This solved my question" on the Apple Support Communities forum?

    You can't uncheck it. You'll need to post the question again.
    You could also just add the comment that it was not actually answered.

  • [Solved] xmodmap bug? Remapping Caps Lock doesn't work

    When I program I like to swap these keys:
    Esc <-> Tab
    Ctrl <-> Caps Lock
    In ~/.xmodmap, I have specified these re-mappings:
    keycode 66 = Control_L
    keycode 37 = Caps_Lock
    keycode 23 = Escape
    keycode 9 = Tab
    The Escape and Tab keys swaps, no problem, but instead of Caps_Lock and Control_L swapping, both those keys becomes Caps_Lock.
    Whatever I try to do, the Control keys doesn't get assigned to Caps_Lock(keycode 66). If I leave the keycode 66 = , the key is un-assigned, but when I assign Control_L or Control_R, it just doesn't work. But, if I assign some other key, for example, keycode 66 = Tab, it gets assigned, no problem.
    Its like xmodmap just doesn't want Caps Lock and Control keys to be swapped. Really frustrating. Any help/pointers would be really helpful.
    Last edited by Gits (2012-04-12 07:09:37)

    Solved: http://unix.stackexchange.com/questions … oesnt-work

  • [SOLVED Noob question about web server permissions

    Hi I have setup up succesfully my web server. Now I am having some permission's questions/problems.
    First of all, I want the /home/httpd/home folder not to be show to the other machine users and only to root.
    I have created a user www-data and I have conf the apache file.
    This is my settings:
    My server directory is: /home/httpd and the permissions I have set:
    home dir:
    ~edited because solved~
    I have set .htaccess to some folders. I don't know If the permissions are safe or not. Can you help me?
    I think that I have different permissions to files and different to the folders...
    Thank you!
    Edited:
    And an example of my permission (phpMyAdmin):
    ~edited because solved~
    Last edited by k3rn31 (2008-02-28 22:26:09)

    This is more of a chat item for me, if you feel like it you can find me most of the time here at http://zaxter.org/xmpp.html if you have flash you can join via a simple click on connect.
    Sorry I've not been of much help to you.

  • [SOLVED] Weird question: pacman -Syu nothing to do for quite a while

    Hi,
    Perhaps this an odd question but I feel like for the past 2-3 weeks on two different computers "pacman -Syu" returns "x up to date" for all repos and "nothing to do" as the result. Could nothing really be upgradeable for this long? Can anyone else confirm this or has something gotten goofed? Is there a way to check actual versions with what I have to make sure things really are working properly? Even if nothing was upgradeable I can't remember the last time I saw core, extra, or community actually download without doing "pacman -Syyu". They alway say up to date and I'm thinking this just can't be correct...
    What might help for me to post? I haven't changed anything in pacman.conf or pacman.d/mirrorlist...
    Thanks,
    John
    Last edited by jwhendy (2010-09-02 14:20:53)

    x33a wrote:
    In the future, take a look here:
    https://www.archlinux.de/?page=MirrorStatus
    That's the link I keep losing. Bookmarking now...
    @jwhendy can you change the subject to include the word [SOLVED], please?

  • I have solved some questions, please check if my answers are correct

    Hi every Java aces,
    I have solved some programming questions, please check if my answers are correct. Thanks
    Here are the questions and the answers to each question
    (a) Write a method called add that takes three integers as parameters and returns an
    integer that is the sum of the three parameters.
    (b) Write a method called max that takes three integers as parameters and returns the
    largest of the three integers.
    (c) Write a method called printMax that takes three integers as parameters and prints
    the maximum value to the screen. The method should return nothing. The method
    should print the words \The maximum value is " followed by the maximum value,
    followed by a new-line character. You should try to use the max method that you
    wrote earlier.
    (d) Write a method called min that takes three integers as parameters and returns the
    smallest of the three integers.
    (f) Write a method called ticketPrice that takes one integer parameter representing
    the age of a person, and returns the price of a movie ticket in dollars (as a
    oating
    point value). Children under 6 get in for free (0.00), people that are 18 or under
    pay 8.50, senior citizens (65 or older) pay 6.50, and all other people pay 10.00.
    (g) Write a method called isDivisor that takes two integers as parameters and returns
    true if the rst parameter is a divisor of the second parameter or false otherwise.
    We say that m is a divisor of n, or that m divides n, if there is an integer k such
    that n = k m. Note that 1 divides every integer, and every integer divides i
    itself .
    here are my codes
    public class Methods
    // This is method (a)
    public static int add (int a, int b, int c)
    int sum = a + b + c;
    return sum;
    // This is method (b)
    public static int max (int a, int b, int c)
    int largest;
    if (a > b)
    if (a > c)
    { largest = a; }
    else
    { largest = c;}
    else
    if (b < c)
    { largest = c; }
    else
    { largest = b;}
    return largest;
    // This is method (c)
    public static void printMax (int d, int e, int f)
    int maxValue;
    maxValue = max (d, e, f);
    System.out.println ("The maximum value is " + maxValue);
    // This is method (d)
    public static int min (int a, int b, int c)
    int smallest;
    if ( a < b )
    if ( a < c )
    { smallest = a; }
    else
    { smallest = c; }
    else
    if ( b > c )
    { smallest = c; }
    else
    { smallest = b; }
    return smallest;
    // This is method (f)
    public static double ticketPrice (int age)
    double price;
    if ( age < 6 )
    { price = 0.00; }
    else
    if ( age <= 18 )
    { price = 8.50; }
    else
    if ( age < 65 )
    { price = 10.00; }
    else
    { price = 6.50; }
    return price;
    // This is method (g)
    public static boolean isDivisor ( int m, int n )
    boolean result;
    int check1;
    double check2;
    check1 = n / m;
    check2 = (double)n / m;
    if ( check2 == check1 )
    { result = true; }
    else
    { result = false; }
    return result;
    }

    Here are my codes
    // This is method (a)
      public static int add (int a, int b, int c)
        int sum = a + b + c;
        return sum;
      // This is method (b)
      public static int max (int a, int b, int c)
        int largest;
        if (a > b)
          if (a > c)
          { largest = a; }
          else
          { largest = c;}
        else
          if (b < c)
          { largest = c; }
          else
          { largest = b;}
        return largest;   
      // This is method (c) ?
      public static void printMax (int d, int e, int f)
        int maxValue;
        maxValue = max (d, e, f);
        System.out.println ("The maximum value is " + maxValue);
      // This is method (d)
      public static int min (int a, int b, int c)
        int smallest;
        if ( a < b )
           if ( a < c )
           { smallest = a; }
           else
           { smallest = c; }
        else
          if ( b > c )
          { smallest = c; }
          else
          { smallest = b; }
        return smallest;
    // This is method (f)
      public static double ticketPrice (int age)
        double price;
        if ( age < 6 )
        { price = 0.00; }
        else
          if ( age <= 18 )
          { price = 8.50; }
          else
            if ( age < 65 )
            { price = 10.00; }
            else
            { price = 6.50; }
        return price;
      // This is method (g)
      public static boolean isDivisor ( int m, int n )
        boolean result;
        int check1;
        double check2;
        check1 = n / m;
        check2 = (double)n / m;
        if ( check2 == check1 )
        { result = true; }
        else
        { result = false; }
        return result;
       // This is method (h)
      public static boolean isProduct ( double a, double b, double c )
        boolean result;
        if ( a == b*c )
        { result = true;}
        else
        { result = false;}
        return result;
         

  • [SOLVED] xmodmap not affect firefox

    I remap some dead keys on my keyboard with xmodmap. They're working with all programs but firefox. Could anyone help me? This is my ~/.xstart. I called it after system start.
    ~/.xinitrc:
    exec ck-launch-session dbus-launch ~/.xstart
    ~/.xstart:
    export GTK_IM_MODULE=ibus
    export XMODIFIERS=@im=ibus
    export QT_IM_MODULE=ibus
    xmodmap -e "keycode 108 = 0x70" &
    xmodmap -e "keycode 62 = 0xff52" &
    xmodmap -e "keycode 105 = 0xff54" &
    xmodmap -e "keycode 135 = 0xff1b" &
    ibus-daemon -d -x &
    nautilus -n &
    pidgin &
    firefox &
    skype &
    avant-window-navigator &
    wicd-gtk -t &
    gnome-do &
    thunderbird &
    dropboxd &
    compiz --sm-disable --ignore-desktop-hints ccp
    SOLVED:
    Add/change a line:
    Option "XkbVariant" "intl"
    /etc/X11/xorg.conf.d/10-evdev.conf
    Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "XkbModel" "asus_laptop"
    Option "XkbVariant" "intl"
    Option "XkbLayout" "us"
    EndSection
    Last edited by hoanglan87 (2012-07-05 07:23:55)

    The 0xff.. are CJK full width characters, do they really work in other applications?
    Just use the names:
    xmodmap -e "keycode 108 = p P" &
    xmodmap -e "keycode 62 = r R" &
    xmodmap -e "keycode 105 = t T" &
    xmodmap -e "keycode 135 = semicolon colon" &
    Last edited by Procyon (2012-06-12 11:11:24)

  • [SOLVED] xmodmap, alt-gr + j or n

    OK, so I've set up my own keyboard layout with xmodmap. Other than remapping to Dvorak, I have different symbols for almost all <alt-gr> + <letter> combinations. For example, I can type '(' by pressing <alt-gr><e>.
    Now to the problem: this works very well, except for two keys: j and n. <alt-gr><j> only inputs 'j', even if I specify something else. Same for 'n'. I've tried different keyboards, and today also on my laptop, all with the same result.
    After some searching I found a guy with the same problem in a German forum, but the solution posted there didn't help. Any archer who knows how to fix it?
    Last edited by Mogger (2009-02-10 20:44:04)

    Hah. Great mystery solved.
    You can even ask X to have AltGr-A generate "cursor left" instead of æ. Here's the rub: you can do it with the A key. You can't do it with the J key.
    What!, you say. Actually, on vanilla X, this will work. Where vanilla X is "X without the XKB extension." If you disable XKB using export XKB_DISABLE=1 before calling the program you need the funny key-layout in (usually your entire session), this will also work. Why doesn't it with XKB? It doesn't work with XKB apparently because in the XKB setup for "my" country, the A key has some keysyms defined in the AltGr layer, and the J key doesn't. And if they don't exist, you can't overwrite them. I consider this a bug.
    Source.
    I think I'll do it the "proper" way with xkb instead of xmodmap. Just have to figure how.

  • [SOLVED] Some questions about a recently submited package (cgames)

    Hi there, when searching for ncurses sokoban-like games I ended up finding a great one that wasn't at the AUR yet. I submitted it (the package is named cgames) but I have some questions.
    1- The source code provided by the developer has 3 games. Should I have packaged each one individually? I decided this way because they are so small that I figure nobody would have a problem in having them all even when just wanting to play one of them (you can always change the make command in the PKGBUILD if you want a single game).
    2 - The original package had some compiling problems due to a function called getline (already existing in stdio.h) and I solved this problem with a sed command. Is this the proper way to do it? Should I have created some patch file or something?
    3- I'm 99% sure the game works in 64bit archs, but 99 isn't 100. Can anyone try it out for me, so that I change the PKGBUILD? I know I should have tested it but I don't have the time to install a 64b arch in the next few days.
    Thank you in advance
    Last edited by jlcordeiro (2010-03-29 15:33:58)

    Yeap, a bit
    Anyway, all done (i think)
    Second release:
    - Replaced sed command with a patch
    - Added x64 arch
    - Fixed a little bug with the configure command
    Last edited by jlcordeiro (2010-03-29 15:32:42)

  • [SOLVED] xmodmap qt4 modifier keys no longer work

    Hi, I'm nearing the "hair-pulling stage because Googling this issue did not yield helpful results" stage.
    I am having trouble getting modifier keys (CTRL, ALT) to work in qt apps after loading my custom keymap (as provided by ~/.Xmodmap). If my custom keymap is not loaded, then ctrl, alt keys work fine in qt apps. That is, it is only when this custom keymap is loaded that qt apps no longer respond to what I have mapped as the CTRL and ALT keys.
    I have awesome wm setup to load the command xmodmap ~/.Xmodmap automatically on startup using this lua code:
    awful.util.spawn("xmodmap " .. os.getenv("HOME") .. "/.Xmodmap")
    My ~/.Xmodmap has comments on what I've switched around.
    I am not sure what is causing this to occur? How can I fix this?
    FYI on Xfce4 loading the custom key mappings don't lead to this issue with qt apps not responding to what I've set as modifier keys.
    Update 10/08/2014 5:55PM CST It turns out I had a different .Xmodmap from when I was using Xfce4. There's something funky with the version I was using with awesome wm.  I've updated Xmodmap here, in case somebody runs into a similar issue.
    Last edited by hckr (2014-10-08 22:59:59)

    To get my inspiron 8500 working I had to use the xkbmodel set to inspiron and remap a little like this
    /etc/X11/xorg.conf
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbOptions" "altwin:super_win"
    # Option "XkbModel" "pc105"
    Option "XkbModel" "inspiron"
    Option "XkbLayout" "gb"
    Manually configured other keys in ~/.Xmodmap. To see current mappings use "xmodmap -pk"
    keycode 162 = XF86AudioPlay
    keycode 153 = XF86AudioNext
    keycode 144 = XF86AudioPrev
    keycode 164 = XF86AudioStop
    keycode 129 =
    keycode 130 =
    keycode 131 =
    keycode 132 =
    The 129-132 were wrongly mapped so I unmapped them
    I then still had to configure Amarok global shortcuts to use the keys, but it worked, Maybe as I am using XFCE.
    Last edited by alleyoopster (2008-11-22 23:35:17)

  • Threaded Sudoku solver - Assignment question (NOT LOOKING FOR ANSWERS  )

    Hi All,
    I'm going to be upfront and point out this is an assignment that i'm currently working on and i'm not receiving much in the way of feedback from the class forums.
    This is currently a 4th year OO assignment for UNSW Australia.
    What I am having trouble doing is figuring out where my program is deadlocking or dying. There have been a number of requirements set out by the assignment, basically no synchronization, no locking. We are able to use volatile, atomic, immutable and thread-local objects. The task is to find all solution for a given N x N sudoku problem using X number of threads. I have successfully built the solver (X = 0) without too much trouble and I thought i had managed to modify the recursive algorithm to suit but unfortunately I think I have come unstuck.
    Any generalized tips would be appreciated when implementing threads that utilise checking flags to determine when the thread is finished processing.
    Kind Regards,
    Chris Gibbs

    Honestly, I think that recursion (as you stated) would be the easiest way to have solved this problem. But as you stated, threads must be used to solve this problem as a requirement of the project...
    You could easily launch a Thread each time instead of calling your recursive method... that could possibly result in a crap load of threads, but the idea would work.
    Definitely take a look at the SwingWorker class here if you're able to use J2SE 6: [http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html|http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html]
    I currently use it while gathering data from several websites at the same time. What I did was create and execute() X number of MySwingWorker objects to collect the data, while they are not complete (i.e. MySwingWorker.isDone() is false) I just Thread.sleep(...).
    Give it a try. It may suit your needs.

Maybe you are looking for