Does anybody know how to program the Luxeed LED keyboards directly? - service

I have a Luxeed, either the U5 or the RaMa series (not sure which, these people don't give you a lot to go on). I want to program the LEDs directly, but I have no idea how. Their software isn't that intuitive and seems limited anyway (though it's hard to tell, it being so unintuitive and all). Ideally it would be in Python (or possibly .net, since it should be a Windows service). Anybody have any idea how I would do this? Or where any specs are? Thanks.

From here http://luxeed.com/files/8012/8538/3827/comparison_chart_en.jpg, it seems that if you have a U5 you are in bad luck as it does not seem to be able to interact with the host computer. If you have a rama or U7 maybe the best way to start is by looking to other implementations available in other O.S. .e.g.: kurtstephens.com/luxeed

I've just bought a luxceed U7 (says model on the underside of the keyboard).
The Function Keys (F1-F8) represents each of the colors:
F1(R) == Red
F2(Y) == Yellow
F3(G) == Green
..
To set the colors:
Press [Luxceed] Button
Press a function key, eg F3 for green.
The colored LED to the very right of the keyboard should go green.
Every key on the keyboard you now press will turn Green (unless its already coloured)
Pick a new color, eg F1 for red, what you press will now turn Red
Press [Luxceed] button again to turn off color setting mode (LED to right should go off).
How to save a pattern/design/color layout:
Make a design as above by setting the colors.
Your keyboard can save a few different 'presets', my U7 stores four; P1, P2, P3, P4.
Hold down the [luxceed] key + P1 will save your current design over preset 'P1'.
Press say 'P2' to move off of your preset and over to preset 'P2'. Then press P1 to go back.
Do the presets stay saved? YES
For my U7, I was able to unplug the keyboard (kept it unplugged for a minute) then plugged it back in and it retained the presets I had in memory. I read somewhere that the keyboards did not save the presets when unplugged, but so far the save worked for me.

Related

Keybindings with mouse click

I am developing in C#, and when I hold down cmd (macOS) and Click a method, I am taken to it's Definition. I am looking for a way to be able to hold down cmd+shift and click the method, and be taken to the methods Implementation. I have searched and tested for some time without finding anything; I am starting to think it is not possible.
Does anyone know how, or if it even is possible?
It's currently impossible. Mouse clicks are not considered modifiers and cannot be customized right now. There's an open issue for this: https://github.com/microsoft/vscode/issues/3130.
You can still press command+F12 to jump to Implementation (which may be unhandy, since you have to press Fn as well). Besides, some applications or specific mouses allow you to map keys.

ControlClick is not working

My script is supposed to press a button somewhere in my window, upper left. It is not working as it should be. I tried this:
ControlClick ClassNN ThunderRT6UserControlDC29, ahk_class ThunderRT6FormDC
Yet it doesn't work.
I tried the manual option:
Controlclick x160 y60, ....
But that doesn't work as well.
Eventually I resorted to a mere:
Click 160, 60 and that does work.
I was wondering why it is behaving like that? Also, is there a way for merely the button to get pressed without the mouse actually going all the way over there. I looks stupid and it is slow.
The main reason for me asking this question is because it is closely related to another question I posed:
How to obtain textual contents from a window
The common denominator is that anything with classNN and ahk_class seems to be problematic.
Try running script as a administrator (if you're on Windows 7 or Vista)
I finally found my own solution after skimming the documentation more thoroughly:
https://autohotkey.com/docs/commands/ControlClick.htm#Reliability
You can specify NA as the sixth parameter to wait for the mouse button to lift.
I found that when firing Control, Check, ,Button1 prior to ControlClick the click didn't work, but adding the NA to the end somehow magically fixed it. I suppose a click was being simulated and had not yet lifted.
First, make sure you have the capitalization correct. controlclick is case and space sensitive - everything in the name has to be correct.
Second, for your mouse-moving issue - first save the position of your mouse, then controlclick, and then put your mouse back where you found it. The mouse will only be out of place for the duration of either the click or the timeout. 160ms is not noticeable.
You might also try using ahk to activate the window, bringing it the front, and then seeing if you can tab through the controls to the one you want, and then push it by sending keys like space or return to the window in the forefront (which you have activated). This avoids using controlclick altogether. Some windows can be tricky.
Controlclick x160 y60,A,,Left,1, NA
Manual option like that should work,at least in my case it worked.
Left = your mouse button pressed
1 = number of clicks
A = Active Window
Also options to retrieve contents from the games or retrieve variables from other autohotkey parts for ControlClicks or SendMessage/PostMessage seem to not work yet.

Autohotkey fails to recognize image under resolution change

I have created an autohotkey scripts which automates a manual process by launching an application and clicking on the script mentioned icons. The script is working fine on one computer which having higher resoultion but fails to execute on other computer with different resoultion. Do you have any suggestions to workout in other way. This app doesn't have any keyboard shortcuts and only executes on mouse clicks. I hope there will be an anwer.
Most Apps Have Alt Shortcuts, have you tried them? also you may try re-adjusting mouse click x,y as per resoulution
::: Explaining the problem ::: Please read to understand the problem.
Lets start off simple you create the autohotkey script on COMPUTER_A, you print_screen/capture all your images & resize them on COMPUTER_A, however when you transfer your files to COMPUTER_B image_search does not find matchs as well or at all, why is this ?
Well COMPUTER_A and COMPUTER_B are two totally different computers, the problem comes cause with two different computers each have different COLOR TEMPLATES installed on them, if you copy the color template from COMPUTER_A onto COMPUTER_B or any computer. Overall problem is different color templates does not allow image_search to find a match pixel by pixel cause the varying difference between the two different computers. Thats why its best to copy color template from computer_A to another computer to allow image search to work properly.
::: Finding the COLOR Template :::
On Win7 --> Control Panel --> Color Management --> Mine was easy to find cause it is the color template that came with my computer monitor, however yours might take a little more work in finding. ICC profiles are generally printers, ICM profiles are display drivers/color templates for you computer screen. Once you find your display profile currently in use on COMPUTER_A find it on your computer storage & copy it to your autohotkey direction for easy access in the future so it can be copied with your autohotkey script to computer_B or computer_Z later. Right Click on the ICM once copied to computer_B and click install & its possible you may need to restart the computer for all changes to take affect.
::: Results :::
Once the color template from computer_A is installed on another computer image_search should work exactly how it does on computer_A, i've personally tested the results on 6 different computers from XP, Vista & Win7, always had a 100% success rate which i believe makes this a universal solution/fix to the image_search problem with other computers.
I do caution those few people who have trouble with this to have patience & do you fair share of research into "windows color profiles" to make this solution work for you, i just foresee someone accidently finding/copying the wrong ICM/ICC profile. Also to be warned if someone installs photography software/development software like adobe photoshop/multimedia/development software sometimes they come with their own ICM/ICC profiles and could overright the existing ones causing image_search to again become a problem. Just reinstall the default ICC/ICM profile again to fix that problem.
::: CONCLUSION :::
I hope this was helpful to someone, sorry for all the writing but i thought it best to share my complete findings with you all since it can get complicated.
Here is how I once solved it.. In the beginning I ask the user to capture the mouse position of each icon, and store these coordinates for later use.
Hotkey, LButton, off ; Make sure that the Left Mouse button inactivator is turned Off
Lbutton:: ; Disable the Left Mouse Button
SplashImage , %A_ScriptDir%/Images/YourScreenShot.jpg,,, Screen shot, Icons ; Show Screenshot of what the user needs to do
SoundBeep 1000, 300 ; wake up user
SplashTextOn, 200, 100, Script Preparations, Please Click on Icon1. ; Show new instructions to the user
WinMove, Script Preparations,, (A_ScreenWidth/2)-150, (A_ScreenHeight/2)-200 ; Move the text instructions window with the name "Script Preparations" 150 pixels right of the center of the screen and 200 pixels up
SoundBeep 600, 300 ; Wake up user
; Here the left mouse button will temporarily be disabled (to prevent actions)
Hotkey, LButton, on ; Turn Left Mouse Button OFF, to capture the Mouse click
KeyWait, LButton, D ; Wait for LeftMouseButton click Down
MouseGetPos, xpos1 ,ypos1 ; Store the position where the mouse was clicked (Icon1)
Repeat this for all icons used.
Then if you want to click on icon1 use:
MouseClick, left, %xpos1% ,%ypos1% ; Perform the mouse click on the captured mouse location

How to make an exe for my united iphone application

I created a game using unity iphone.there are six characters in my game,first you click one character,the character was selected, and then you click a target position,the selected character will move to your target position. this function work well in the unity3d iphone engine. however when i build an exe file for it, although the exe file can be opened in window xp, I can only selected the character,the rest operation can't work.I don't know what cause this problem, can you give me some advise.
My build step is below:
In Unity…
Select “File” from the top menu.
Select “Build Settings”
Select “PC & Mac Standalone” under the platforms column (lower left)
On the combo box labelled “Target Platform” select “Windows”
Click “Switch Platform” button (lower left, 1st button).
When all the assets have been reconverted to suit the new platform, you’ll be ready to click the build button (lower right).
Thanks in advance.
You'd need to be more clear on your problem.
First of, did you added Input controls for Mouse control? If not, go to Input settings and add it. There you can basically define which input events (mouse, keyboard, joystick, touchscreen) are mapped to what actions.
For example, if you want mouse and keyboard movement, you have to add Horizontal and Vertical axis twice. Once for mouse input, one for keyboard input. I guess it's same for iPhone, since it's touchscreen you probably have to add some kind of axis or code which will handle it correctly. Can't tell much more, as I don't have iPhone neither the unity license for it.
Second off, your question would be more appropiate to be asked at http://answers.unity3d.com/, which is unity's official Stockexchange version for asking/answering questions and there are only unity developers there.

What is the best way to avoid getting "Emacs Pinky"? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Closed 6 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with "Emacs Pinky" by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid potentially getting this type of repetitive strain injury?
Making caps lock another control key is a good place to start. Invest in an ergonomic keyboard. Some emacs users even go as far as to get foot pedal things for control and meta...
Configure so that the space bar works both as space and control; when the space is pressed alone, as a space, and pressed with others, as ctrl. So Space + x is treated as Ctrl + x.
You can do it with AutoHotKey in Windows, and with "at-home-modifier" in Xorg in Linux. (X, but Linux only.) You can use Karabiner (formaly known as keyremap4macbook) in Mac. (In fact, I am the author of at-home-modifier. =)
You can do more, if you have a keyboard with many keys around the space, like Japanese keyboards:Japanese keyboard http://www.owltech.co.jp/products/keyboard/KB86STD/KB86STD_B-320.jpg
My bottom row is basically EscBSSpaceEnterTab, but when used as modifiers, it's AltShiftCtrlShiftAlt. (For example, if you hold down Esc first and then Space, it's Alt+Space, but Space followed by Esc, it's Ctrl+Esc. If you press Space, Esc, and x, then it's ctrl + alt + x.) All can be pressed with the thumbs. You can order a Japanese keyboard from say amazon.com. You don't have to speak Japanese.
This is extremely handy. For firefox (sorry, not emacs) for example, focus a link, and press Ctrl + Enter; then it'll be opened in a new tab. (By also pressing Shift, it'll switch to the new tab, rather than staying on the current.)
(The above picture is the one the author of at-home-modifier uses. The maker doesn't sell this model any more, though.)
alt text http://www.userfriendly.org/cartoons/archives/07sep/uf010710.gif
# Xiong Chiamiov
Get a foot pedal! (I have a kinesis.) After you do, unmap control and capslock so you force yourself to use your feet.
(FYI, remapping capslock will help, but after enough emacsing in one day, will not be a total solution.)
For the love of God - use another text editor! If it's something that requires a foot pedal to work with it normally, then... well... frankly, I'm speechless. There is a multitude of powerful contemporary text editors out there that don't require you to memorize volumes of arcane keystrokes or buy fancy hardware.
You know, I can understand and accept a lot of things, but a foot pedal for a simple text editor is really where I draw the line.
I have always been curious about why such a large community of programmers, writers, geeks, etc. haven't yet found super simple and effective solution to this problem. Simply: 1) take a small piece of paper, make paper ball of it; 2) use scotch to stick it on to your left ctrl key (temporarily removing it from the place); 3) when writing, use side of your left palm to press that key - now this key is higher than others and you can do it easily. That way you don't need to buy uber ergo-keyboards, or remap ctrl key to capslock (which you eventually will push with your pinky anyway)...
So much discussions about such a small problem.
Remap Left-Ctrl and Caps-Lock so they are where they should be:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,1d,00,1d,00,3a,00,00,00,00,00
 
I totally agree with the remap caps-lock solution, that helps quite a bit.
To go even further, I tried and liked the Ergoemacs keybindings. The project is being actively developed, and supported quite well. I personally don't use it because it's not integrated with Mac OS X (some EMACS Keys are integrated in Cocoa), though it seems someone has posted an inputrc file with Ergoemacs keybindings.
Another trick I've been playing with is enabling StickyKeys. It's supported on many platforms and alleviates some of the problems specific to chording (as opposed to just overuse): it is apparently recommended on the emacswiki: http://www.emacswiki.org/emacs/StickyModifiers
I use the excellent key-chord mode for common actions. You can give it functions or key sequences to call.
To make sure I do not obstruct normal typing too much, I generated letter statistics to find good key chords. I recorded them along with my default chords.
Additionally to more convenient command-calling, I have chords for inserting stuff like
Best wishes,
Arne
I hate writing emails without that ☺
Also I use control lock mode for things like flyspell, where I need control all the time. That’s modal editing with real emacs shortcuts.
The chords I use the most are
; buffer actions
(key-chord-define-global "vg" 'eval-region)
(key-chord-define-global "vb" 'eval-buffer)
(key-chord-define-global "cy" 'yank-pop)
(key-chord-define-global "cg" "\C-c\C-c")
(key-chord-define-global "äü" 'control-lock-toggle)
; frame actions
(key-chord-define-global "xo" 'other-window);
(key-chord-define-global "x1" 'delete-other-windows)
(key-chord-define-global "x0" 'delete-window)
(defun kill-this-buffer-if-not-modified ()
(interactive)
; taken from menu-bar.el
(if (menu-bar-non-minibuffer-window-p)
(kill-buffer-if-not-modified (current-buffer))
(abort-recursive-edit)))
(key-chord-define-global "xk" 'kill-this-buffer-if-not-modified)
; file actions
(key-chord-define-global "bf" 'ido-switch-buffer)
(key-chord-define-global "cf" 'ido-find-file)
(key-chord-define-global "zs" "\C-x\C-s")
(key-chord-define-global "vc" 'vc-next-action)
First I'd like to point out that suggesting not to use Emacs because the default keybindings may not be for everyone doesn't make any sense. Emacs is the most configurable "text editor" ever made and so, of course, trivial things like keymappings are fully configurable.
Regarding the "Emacs pinky" issue, I noticed that several people have "anti-Emacs-pinky" keybindings in their .emacs, like user "Paul Nathan" (17.5k rep as I type this) here:
What are good custom keybindings in emacs?
Then it is known for a fact that many people prefer the vi way and user Emacs' viper-mode.
I think that the major issue in Emacs is, by default, over-reliance on CTRL and more specifically C-x and C-f / C-b. These three are really terrible because it means, IMHO, painful fingers distortion.
So to me first the problem has to be defined: what is the issue? The issue is an over-reliance by default on CTRL, the fact that CTRL is typically badly located on most keyboards and the fact that most keyboard out there (I'd guesstimate more than 99.9% of all keyboards ever produced) are total pieces of junk.
So what is my solution to this?
I use a good mechanical keyboard and I do touch-type. People really serious about this will probably shell out $$$ for a very good split & matrix keyboard (like the Kinesis Advantage)... Because split and matrix are the only kind of keyboards that makes sense from an ergonomic point of view (this is not even open for debate). I, sadly, have been typing for three decades and cannot adapt to matrix layout, so I'm using an old (flawed) staggered keyboard. If you're going to use a staggered keyboard, at least take one that has a good switch (for example buckling springs like in the IBM Model M or Cherry MX switches or Topres like in the Happy Hacking Keyboard Pro). Be ready to shell out $500 and more if you hope to find a split + "mechanical" staggered, like the Cherry MX-5000 (*) or the IBM M15.
So: in short, if you're really serious about this, go for a Kinesis Advantage (they're using Cherry MX switches and you can even choose your specific switch if I'm not mistaken).
If, like me, you sadly cannot adapt to these wonderful keyboards because they're "too different", then go for a good "mechanical" keyboard. Any keyboard allowing not to "bottom out" while typing will save your fingers' joints. Helps after decades of programming.
If you don't want to go the "mechanical" route and think rubber domes are fine keyboards (I consider them junk but each it's preference), then at least choose a good rubber dome. MS' Ergo 4K would be a good choice (once again: it's rubber dome so to me it's a finger-destroying junk, but it's a matter of taste).
once you're using a good keyboard, remap CAPS-LOCK to CTRL. Can be done on any OS. It's trivial and there are plenty of links on the subject.
Remap Emacs' keys to stop over-relying on CTRL. First CTRL-x is terrible. It really has to be the worst shortcut ever. But you can remap ctl-x-map to what you want. I do this in my remapping minor mode:
(define-key my-keys-minor-mode-map (kbd "C-,") ctl-x-map)
C-, might not suit you: pick something else...
Then there's the issue of cursor movement. I think it's a big one for "text editor". Even if tend to use all the fine Emacs functions to quickly move around the text buffers instead of "moving the cursor", I still do need to move the cursor "manually" quite often.
C-f / C-b have to be the two most stupid shortcuts to move the cursor ever.
I use M-{i,j,k,l}. So people prefer {hjkl} instead of {ijkl} but I like {ijkl} because it reproduce the inverted T-arrow. I also like the fact that when, as a touch-typist, you're in your home row, you already have three fingers on {jkl}. No crazy finger motion to reach 'f' or 'b': makes no sense.
Last but not least: when you're not typing, do rest your fingers on your keyboard. For this of course you need a keyboard with a good switch which has enough resistance not to activate when you're simply resting your keys on your keyboard.
The Microsoft Natural Keyboard has been very, very good for me. I use emacs for everything 10+ hrs a day with no problems.
My advice would be to try using your thumbs to press modifier keys (control, alt) when they are within a reach. On keyboards which have shorter space-bar it is possible to press Alt (Meta) even without bending your thumb inwards. You can remap e.g. right Alt to Control and this way be able to conveniently access both Control and Alt.
This is also possible on MS Natural Keyboards.
Consider a Kinesis Contoured keyboard. It took me about a month to get up to speed with mine and I now consider it to be the ideal Emacs keyboard, even without the foot-pedal.
No joke. I ordered my first one with a food-pedal, but found I wasn't actually capable of coordinating the timing of my feet and my hands sufficiently to make much use of it for modifier keys. For a while I used it to toggle the integrated number pad, but I gave that up when I realized I wasn't using it because the number row on the Kinesis is so easy to reach.
One solution not yet mentioned here is to use both hands for key combinations.
For example, suppose you want to press <CTRL-K>. On QWERTY-keyboards, <K> is on the right, so press <CTRL> with your left hand and <K> with your right hand. Once you get used to the system, it works fine.
Per #Alasdair, remap Ctrl to "Caps Locks" or elsewhere: instructions for various platforms.
P.S. I'm a bit surprised this can't be done via an elisp function.
One more approach: if you want to avoid getting "emacs pinky" simply do not use pinky to press control key.
If it is necessary remap keys on your keyboard to go in the following order:
[Ctrl][Alt][ Space ][Alt][Ctrl]
On any standard keyboard (which symmetrically positions modifier keys, e.g. any MS keyboard) now you can press Ctrl key with ring finger and Alt key with middle finger on both hands. These fingers are much stronger than pinky and can endure frequent use.
Great tool for easily remapping keyboard keys on windows is AutoHotKey
On Ubuntu I managed to do it using: Keyboard Preferences / Layouts/ Other options
Try viper-mode, which is a vi emulator in emacs. As someone who has switched back and forth between vi/emacs/vim several times in the last 25 years, I'm now finally trying viper-mode in emacs, and I like it. I find the vi commands to be more comfortable, but I can still keep the advanced features of emacs that I like.
I use emacs and bash all day every day, and I have capslock as an extra left-control key, like VT100 intended. Nobody's mentioned the best way to do that on X11, yet. (actually, this is specific to the X.org/xfree86 X server, which everything uses these days):
setxkbmap -option ctrl:nocaps
Or edit your xorg.conf to have
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbOptions" "ctrl:nocaps"
Option "Autorepeat" "200 40"
EndSection
(The XkbOptions and Autorepeat are what I added to the pre-generated one. Then X will start with the right key mapping every time, and you don't have to find where to put setxkbmap to have it executed every time you log in and start your window manager.)
Although gnome does have a keyboard manager thing, as boskom mentioned.
FYI, emacs was originally written for MIT lisp machines with "space cadet" keyboards. X11 has super, hyper, alt and meta modifier keys. Sometimes the "windows keys" on PC keyboards are mapped to Super. They're handy to bind to window-manager stuff (e.g. switch virtual desktops) because almost no apps normally use them.
Put the modifiers where they were meant to be: on either side of the space-bar, where they can be pressed by the thumb (or other digit of your choice) on the opposite hand from the digit pressing the modified letter (so that C-g is right-thumb on Ctrl and left index on 'g', and C-k is left-thumb on Ctrl and right middle on 'k'). You will note that the correct sequence, from inside out, is Ctrl Meta Super Hyper.
How you do this depends on your OS and your keyboard. For Windows, you might like to start here. In Mac OS X you can look in System Preferences > Keyboard & Mouse > Modifier Keys. For Linux, there are a thousand xmodmap and XKB tutorials.
to Chow,
yesterday i found a solution that we can have system wide ErgoEmacs keybinding on the mac.
The trick is to use mac os x's keybinding system so that you have system wide ErgoEmacs keybinding with the Control key. Then, in OS preference, swap the Control and Cmd key.
So that, you get ErgoEmacs keybinding system wide with the modifier beside the space bar. The draw back is of course that normal mac Cmd+key is now at the corner of keyboard. So, it's a trade off, about whether you use most apps for text editing, or the app's shortcuts.
might give it a shot here:
http://code.google.com/p/ergoemacs/wiki/ErgoEmacs_keys_system_wide
also, few years back i tried the mac's os wide custome keybinding, some cocoa apps still doesn't support it. See bottom here
• How To Create Keybinding In Mac OS X
but perhaps things are better now.
I have a MS natural keyboard as well and it's awesome. I've managed to train myself to use the side of my left hand (below the pinky) to hit the Ctrl key.
Even after remapping capslock to become control, you still have to use your pinky to press it - at least I do, because my ring finger won't reach it for a command like C-g. Using your pinky at all is not recommended, right?
I'm on a MacBook Pro and I've just remapped the ⌘ on the right side of the keyboard to become control. So that way, for instance, C-g becomes a keystroke I execute with both hands, my right-hand thumb on ⌘ and my left forefinger on g.
We'll see if that helps with my RSI. Anyone else done this?
One of the first things I do on a new machine is remap Caps Lock to a new Control.
Google around, there are plenty of .reg files available that will do this painlessly for you on Windows.
I started using the side\palm of my hands to hit the control key instead of my pinky fingers. My understanding is that on more ergonomic keyboards the control key button is bigger which makes it easier to perform that motion.
I can use the Control key in either the west or south-west positions without any trouble. Many Emacsers swear that the control key belongs in the west position and the west position only, and that anything else will ruin your pinky. The only thing we know for sure causes RSI from typing is too much typing. Try type-break-mode and see if a few regular breaks help.
Buy a Happy Hacking Keyboard which has Ctrl in The Right Place (Caps Lock is moved elsewhere). It has excellent response and is configurable via DIP switches for maximum integration on Mac, Windows, and Linux (for example, you can switch what is Alt and what is the Windows key right from the keyboard, no software required).
It also has a very small footprint, if that suits your fancy.
Since this thread is still kinda going, I'll add my two cents:
With or without emacs, the ctrl key is useful for tons of stuff on linux or windows: copy, cut, paste, find, close, quit... I use this stuff constantly. So as others have suggested, I want that near the spacebar so I can use my thumb. And that's how it is by default on a mac, where all that stuff uses the cmd key:
[ctrl] [alt] [cmd] [spacebar]
So, I use a mac keyboard on my linux box, and set up the cmd key as a second ctrl key (In Ubuntu Lucid: Keyboard Prefs > Layouts > Options > Alt/Win Key Behavior > Control is mapped to Win keys (and the usual Ctrl keys))
[ctrl] [alt] [ctrl] [spacebar]
Other benefits:
* When I need to use a mac sometimes, cut/paste/etc are all in the same place I'm used to.
* ctrl+tab (with the real ctrl key) still moves through tabs for browsers and other apps, on both platforms.
The drawback to this plan is that the alt key has moved to the left, so the alt+tab command (which I use for window switching) no longer matches the mac equivalent cmd+tab. But I can still hit it with my thumb, and it's still, to me, a far lesser evil than destroying my pinky. Yeah, I know I could just make ctrl+tab the window switcher, but then the real ctrl key doesn't work for tab switching. Besides, with apps moving into the browser, the window/tab navigational strategies are gonna be in flux for a while -- but the basics like cut/paste aren't going anywhere, so I want them locked down. Under my thumb.
(Of course, if you wanted to use emacs on a mac, I guess you'd be back at square one...)
I actually did my own hack to avoid using the ctrl key. I use now the SPACEBAR key.
This small program for X changes the behavior of the space bar, so that when it is used in a combination, it adds the control modifier to it. When used alone, it behaves normally on release.
That way you don't have to use your pinky at all! Worked perfectly for me.
I am not a programmer and I also have a hard time explaining ideas. I am on a dell mini laptop. The mouse touchpad is in a spot where my thumbs rest.
My left touchpad button acts as a control key:
With the side of my thumb I press it and edit in emacs as usual.
I was going to map the right touchpad button to alt, but instead I have done the
following:
I press the button and the control key gets pressed (locked).
I press it again and controll gets released.
This not only made my pinky feel better it also made my editing twice as fast. (according
to my org-mode clocks)
It is hard to explain how nice it works.
In order to do this I used the following two aplications:
xbindkeys
xdotool
My xbindkeys config file:
###########################
# xbindkeys configuration #
###########################
# left mouse button ctrl key
"xdotool keydown ctrl"
b:1
"xdotool keyup ctrl"
control + b:1 + Release
# vi wanna be style editing
"xdotool keydown ctrl"
release+b:3
"xdotool keyup ctrl"
release+control+b:3
# -------------------------
Before experimenting with these ideas make sure to read the man pages.
Do not have anything important open. I had to kill my window manager a few times
before getting it correct.
notes:
I use xmodmap to do all the regular stuff i.e. caps ---> control (not a full solution), swapping alt and control. (on a laptop It is ok but my thumbs cramp up)
I use the window manager config file (stumpwm) to create bindings to load the proper key mapping
file. (depending on my mood for the day)
I am sure all this can be implemented in a different environment.
My pink pain is gone, my editing is faster.
Try the God-Mode plugin that is not bad .