0

I want my keyboard layout to act like a Macintosh keyboard. It's hard to use my computer after years on a mac.

I want to disable my right mouse click, and replace it with Alt + right mouse click.

The Alt key will also act like Ctrl.

I want my Left Ctrl to be the HUD key.

I still want my Super key to be the same.

Can someone please make a script, or point me in the direction of a program to do all this with ease. If you were to make a script/whatever, can you please make one what will reverse all keyboard changes in-case I feel that it is not the same. I will add to the post if I miss anything.

Thank you.

3
  • could you clarify what you mean with 'alt key will act like ctrl'? Do you want to rebind alt to ctrl?
    – rakete
    Jul 6, 2012 at 1:14
  • @rakete eg. i do ctrl+c for copy. I want alt+c for copy instead of ctrl. I want to switch ctrl and alt. plus do everything i mentioned above.
    – jaorizabal
    Jul 6, 2012 at 2:32
  • swapping ctrl and alt could be done with xmodmap, it is actually pretty easy but maybe its better you'd ask it again in a seperate question, or take a look at already answered questions if they help you, e.g.: askubuntu.com/questions/93950/cant-remap-ctrl-key-with-xmodmap
    – rakete
    Jul 8, 2012 at 14:15

2 Answers 2

1

You can use the tool xte to send mouseclicks or keypresses to the X server from the command line. And if you bind that with xbindkeys to alt and left mouse button, then you should have what you want.

First install neccessary packages:

sudo apt-get install xbindkeys xautomation

then create the ~/.xbindkeys config file with the following content:

"xte 'mouseclick 3'"
  Alt + b:1

That should run "xte 'mouseclick 3'", which sends a right click to the X server, everytime you press alt + left mouse.

Start the daemon to make it work (use -n for nodaemon mode if you are testing things, so you can easily kill it with Ctrl-C, start without -n to run it in the background):

xbindkeys -n

The sad news is though: it doesn't work. It should, but for me on Ubuntu 12.04 running Unity/Compiz, it does not work, xbindkeys can't intercept mouse button presses. Still, maybe you are luckier or have a config where xbindkeys is able to intercept mouse button presses.

1
0

In System Settings, you got two places for options about your keyboard :

  • Keyboard Layout to configure the layout of your keyboard (qwerty, azerty, Macintosh, BEPO, ...).
  • Keyboard to configure shortcuts on your keyboard (and your keyboard responsiveness too).
1
  • I tried that already, it doesn’t work perfectly unfortunately.
    – jaorizabal
    Jul 5, 2012 at 23:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .