How to replace non existing key with software key? - keyboard

I have a very unusual problem.
I droped my notebook (Asus Zenbook Duo UX482) and needed to replace the Shell. Since the Keyboard is directly built into the shell, I had to buy a complete shell / Keyboard / mouse combinantion.
Problem: I live in Germany (QWERTZ) but the replacement part was only available in QWERTY. No problem I thought, just swap the keycaps. That has worked for every key, exept one.
With QWERTZ there is a key for >;<;|. This is located to the right of the left shift key.
With QWERTY, this key just does not exist.
Now on one hand, I want to stay with QWERTZ, since all my desktop Keyboards are QWERTZ.
On the other hand are those three symbols really important for programming, and I dont want to paste them into the code every time I need them.
Is there some kind of software solution for that?
I cannot just type in the ASCII code, since this Notebook does not have a numpad (is there a way around that?).
My last option would be to tear down the notebook again and switch the keyboard part of the shell, but I really dont want to do that, because the backlight layer is directly glued to the membrane layer, and I would need to peel it away to get to all the screws.
Thank you for your help!
I tried to insert the ASCII code with holding ALT pressed, but as I mentioned, that does not work, since the Notebook does not feature a numpad.

Related

Simplest way to programatically map certain keyboard's keys

Consider the following: let's say we have a multiplayer game that can be played with one keyboard by two players. Hovewer, first player's control keys are far easier to use that second player's (for example, first player uses arrow keys, when second one has to use WSAD). Important thing is that we can't change these settings in the game options menu.
I figured out the simplest way would be to plug in second keyboard and map its arrow keys as WSAD keys, so both players could use arrow keys when playing that game. But it turns out that there isn't any ready solution for that problem. I've searched for some programs and system options for key mapping, and after my research I've learned that this kind of software - one that would allow to change key mapping for certain keyboard device - is nowhere to be found.
Does that mean I'd have to write some kind of a driver for that particular keyboard I want its key mapped to another keys? I have no experience in writting device drivers of that kind, and any other solutions (including global hacks for keyboard messages, considering I'm using Windows or using programs such as KeyMapper) would work for every keyboard plugged to PC, not just desired one.
So, uhm... Is there some simpler way? I do have basic coding skills, but writting a driver for USB keyboard would be too much for me, I guess (I heard writting device drivers isn't that simple after all).
Well, after some research, I found perfect solution:
http://www.oblita.com/interception.html
This API can do some really cool things with keyboard device. Key mapping is just on of them.
Hope this helps anyone who encounters problems similiar to mine.

Inefficiency in Vim

I consider myself somewhat familiar with Vim,
hate the arrow keys (let alone the mouse),
regularly look up tips and plugins to get the most out of this tool,
use it daily to manage my cloud servers, etc.
However, I always find myself doing the same mistakes probably inherited from the GUI-world:
too often switching to visual mode to see what piece of code I'm about to manipulate,
undoing changes to retrieve lost statements because I forget to utilize registers (and pasting code on temporary lines just to grab it after other edits),
relying on Ctrl-C & Ctrl-V when working with operating system's clipboard,
keep pressing j button to browse through lengthy files to find certain functions.
Probably my Hungarian keyboard layout prevents me from being faster as most of the special characters (/, [, etc.) are only available as a key combination (with Shift or Alt Gr).
Given this specific situation, what pieces of advice could you give me? Have you faced similar bad habits when you were a Vim-novice? I'd like to see my productivity skyrocket (who wouldn't?). Thanks in advance.
I've found a simple, effective strategy. Choose one action, one task or one set of keys that you think is unnecessarily slow. Figure out a better way of doing this using the vim manual or googling or a plugin etc. Force yourself to use this every time. Rinse, and repeat. The path to efficiency is one-by-one elimination of the slow parts.
I'd also recommend just reading the vim manual from time to time - even if you don't remember everything, knowing something's out there is very helpful.
This probably applies well beyond vim, but
something that worked for me was finding a specific feature that I knew would
be more efficient and concentrate on using that for a week or two.
Just one feature at a time, and possibly using it excessively.
After a couple of weeks it becomes automatic and you can move on to the
next thing.
I learn programming tricks the same way. eg. I'll have a month of using lambda expressions for everything, then a month of mapping and filtering.
(not on production code though)
Probably my Hungarian keyboard layout prevents me from being faster as most of the special > characters (/, [, etc.) are only available as a key combination (with Shift or Alt Gr).
I'm sitting in front of german keyboards all day long and know this problem very well. Some keyboard layouts are simply not very suited for programming / using vim. I think its safe to assume that most programming languages and keyboard shortcuts were designed with the us-layout in mind.
My advice: reset your keyboard layout to us-english and practive touch-typing on that layout (typing without looking at the keys). It won't matter that the keyboard labels are wrong and you'll be much more comfortable using vim hotkeys.
The only problem that still remains for me is to produce language specific characters (german umlauts such as ä,ö,ü) wich i assume will also be a problem for hungarian. For that I use a combination of vim-digraphs, linux window manager digraph-key and windows layout-switching hotkeys.
just keep using it. The more you use it, the better you become at it. VIM isn't too bad. The main thing is you just have to remember that it isn't always in edit mode.

Map keyboard for common paste operation

I want to program a key on my keyboard to paste certain static text when pressed.
For instance, I'd like to program the F12 key so, when pressed, it pastes my email address every time. Is there an easy way to do this?
There are some excellent free software products that allow you to remap keys and create macros. For Windows, you can use AutoHotKey. I've used it before and it can be quite handy for this sort of thing.
It's a very powerful tool and can be a little intimidating to use at first but it's worth taking the time to get to know it. The Quick Start guide is quite helpful.
If you mean instead, the ability to do this within your own program using C++ or .NET or something, give some more details.

Is it worth swapping Ctrl and Caps Lock for windows users that don't use Emacs

I've been aware of Steve Yegge's advice to swap Ctrl and Caps Lock for a while now, although I don't use Emacs. I've just tried swapping them over as an experiment and I'm finding it difficult to adjust. There are several shortcuts that are second nature to me now and I hadn't realised quite how ingrained they are in how I use the keyboard.
In particular, I keep going to the old Ctrl key for Ctrl+Z (undo), and for cut, copy & paste operations (Ctrl+ X, C and V). Experimenting with going from the home position to Ctrl+Z I don't know which finger to put on Z, as it feels awkward with either my ring, middle or index finger. Is this something I'll get used to the same way I've got used to the original position and I should just give it time or is this arrangement not suited to windows keyboard shortcuts.
I'd be interested to hear from people who have successfully made the transition as well as those who have tried it and move back, but particularly from people who were doing it on windows.
Will it lead to any improvement in my typing speed or comfort when typing.
Do you have any tips for finger positions or typing training to speed up the transition.
I actually don't swap control and caps and just make caps ANOTHER control key. I can't think of a single time in my life when I have ever hit caps-lock on purpose, so I haven't missed it.
That way, you get used to using it, but if you slip up and use the old control, things still work. It's worked out very well for me.
There's a .reg file to do this here.
I've done it for quite a while now, and it's natural to me, even though I'm not an Emacs user either (I'm in the Vim camp of that particular war :) ). In fact, it's so natural that moving to other machines (coworkers, family members, etc.) causes me grief because Ctrl isn't where it 'ought' to be.
For emacs ctrl should be at caps lock - for vim the escape key should be on the caps lock. I really feel that the caps lock button should be renamed "free parking" and OSes should make a system tray utility to quickly change the free parking button from escape, to control, to anything you need to type over and over again.
I ended up taking the advice in Zach's answer, but I also made Caps Lock behave as an ESC key if it was held and released on it's own using the AutoHotKey script in this gist: CapsLockCtrlEscape.ahk
I also bound Ctrl+Shift+Caps Lock to Caps Lock for the rare occasions when I might need it using this AutoHotKey script:
#IfWinActive
^+Capslock::Capslock ; make CTRL+SHIFT+Caps-Lock the Caps Lock toggle
return
I switched the Caps Lock and Ctrl keys a couple of months ago and after the initial learning period, ~ 1 week, my biggest problem is when I use a computer that hasn't switched the keys.
I first did some registry hack but I can't remember where I found the information on how to do it. Now I'm using a small utility called Remapkey which is included in the Windows Server 2003 Resource Kit Tools even though I think I'm using an older version.
I had no problem making the transition. I use keyboards with both configurations without issue. Perhaps having it as a hardware solution (and the labels properly printed) makes it easier than doing it through software and having to remember how each machine/keyboard is setup.
I think what's best to put on caps depends on your physical keyboard.
At home I type on a Kinesis Ergo Elan where my ctrl keys are under my thumbs, along with 2*alt, space, enter, backspace, delete, pgup, pgdn, home and end; the rest of the keyboard is fairly normally laid out, except the board is split.
With the ctrl keys ready at hand, it really makes the most sense to put escape on caps lock (and caps lock on esc, for the few times I need it). Even if you're an emacser, hey... it doubles as a spare "prefix alt key", and you probably ask your browser to stop what it's doing a few times every day.
On the other hand, if I'm typing on my laptop where the lower left corner key is Fn rather than ctrl (ffs...) and I can't hold down shift+ctrl with one finger, it might make sense to put ctrl on caps (such that I can hold them with a single finger). At least if you're not a vi'er, or you don't mind the escape key being further away (or have some crazy system).
What's really interesting is putting some funky key on shift+shift (yep, both shift keys). This can be done with xmodmap fairly straightforwardly; I put my compose key there. If you don't need compose, you may want to put something else (like, say, esc).
Copy the following code into a file called caps-ctrl-swap.reg, execute the file, agree to allow registry to be changed, log out and back in and your caps-lock and left-ctrl keys will be swapped. I've used this script for whatever version of Windows was current in 2005 and every version in between. I needed it today since Windows 10 updated overnight and it still works great.
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00

Keyboards with the number pad in the middle? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm suffering from early RSI symptoms and am looking for a way to avoid injury. My physiotherapist has determined that the worst thing I seem to be doing is using my mouse at such a weird angle. The problem for me is, I keep my keyboard positioned such that my left and right forearms are angled in the same amount, i.e., my body is centred roughly with the B key. On my current keyboard, which is not a split, this means the wide Enter key, the arrow keys, and the number pad all jut out to the right before I have space for my mouse. I have a medium-width frame, but even still, this leaves my wrist at a really awkward angle when using the mouse. I'd prefer not to have to push my keyboard out of the way every time I switch between the two, but I do use the num pad occasionally, so I wouldn't want a keyboard without that.
I think it'd be ideal to have about a 30-50 cm space between the left and right halves of the keyboard, so my arms are more perpendicular to my collarbone, and the arrow keys and number pad in the middle, maybe even with the numbers on a 45 degree angle, so I could configure them for use with either hand.
(In case you were wondering, then a touch-screen with a stylus that has a right-click modifier button for mousing, because otherwise the mouse pad would be right where I'd put the right half of the home row, in the most natural position for my right arm while sitting.)
With that much space, you could fit so many custom keys for things that you normally use two-key combos for...or you could detach them completely (save for a wire) and just have, you know, actual desktop showing through.
What's the closest keyboard you've seen to this?
I use a keyboard with the numeric keypad on the left hand side. This allows me to bring my mouse in closer on the right hand side, allowing for a more natural position. I am right handed. You can see the keyboard I use here.
(source: keyboardco.com)
http://www.thehumansolution.com/keyboards.html
I've been looking here at some keyboards (I've got severe Carpal Tunnel). The Kinesis keyboards are nice, but there where a few there with the number pad in the middle.
alt text http://us.st12.yimg.com/us.st.yimg.com/I/thehumansolution_2020_3491616
alt text http://us.st12.yimg.com/us.st.yimg.com/I/thehumansolution_2016_1198996
Just an advice. I was also suffering from the RSI symptoms, up to the shoulders. I've tried MS and Logitech ergonomic keyboard without succes. It was even worth than before because the mouse was more distant than before.
Then I founded the TypeMatrix Keyboard and it reduce my RSI to nearly nothing.
Unfortunately, they are hard to found for non US nor Canada citizens.
(source: typematrix.com)
In line with Joel Coehoorn's suggestion, I find that a trackpoint (aka "nipple") is even more ergonomical than a touchpad. Lenovo's USB Keyboard with UltraNav has both.
My mouse usage is minimal, though, because I focus on using the keyboard for everything. This might not be easy in your particular development environment.
(source: ibm.com)
A few years ago I had wrist problems, too.
What worked for me was changing my posture, how I hold myself, my arms. I move my keyboard and mouse around, I change my position and the position of those two.
Additionally I use keyboard shortcuts a lot to not overuse the mouse.
This way I got rid of my wrist problems without replacing keyboard or mouse.
As a fellow RSI suffer, I hope one of these helps out.
The ErgoMagic and ErgoFlex keyboards are split into 3 sections, and you can position the number pad in the middle.
The ErgoFlex is a flat design:
http://www.safecomputingtips.com/blog/ergonomic-keyboard/ergoflex-keyboard/
http://www.comfortkeyboard.com/keyboards_ergoflex.html
(source: safecomputingtips.com)
The ErgoMagic has adjustable tilts for each section:
http://www.comfortkeyboard.com/keyboards_ergomagic.html
(source: comfortkeyboard.com)
I did try a PCD Maltron keyboard for a while when I was having some problems with referred pain, but I never really got used to it. I'm left handed, so my mouse is quite close to the keyboard. If you're having trouble with your mouse being too far out to the right you could try a small footprint keyboard such as a Happy Hacking Keyboard and a Separate Numeric Pad on the left or somewhere else to get a more clement key layout.
I also learned to use a mouse with both hands - you might also try learning to use a mouse left-handed.
alt text http://www.maltron.com/images/keyboards/maltron-usb-dual-l90-uk-mac-qwerty-gray-1-600.jpg
(source: geekstuff4u.com)
The main problem about keyboards is not the keyboard layout or form factor, the main problem of keyboards is the layout. I had really strong RSI problems, to the point I could barely type (only by when accepting major pain!) for two weeks. I couldn't touch a keyboard for 3 weeks till it finally got better. After that the problems always came back every now and then. I tried different keyboards as well. I have a GoldTouch split keyboard, a Microsoft Natural split one, I have even the TypeMatrix one that gizmo mentioned, but it all helped little.
Then I discovered the Dvorak layout. At first I thought it's a silly idea, but I took that route. It was a hard training and it took me quite a long time, but now it's the only one I keep using, as it's the only one I can type on for ours without any RSI symptoms. At first things seem to have gotten worse, but that's only because a new layout will lead to new finger movements.
Recently I found out about Colemak, another alternative to QWERTY, it seems even more promising than Dvorak; I'm just trying to learn it... and I have a hard time again.
Another thing that helped me much more than replacing the keyboard is replacing the mouse. I'm not using a mouse any longer, I'm using a trackball.
(source: arstechnica.com)
And after I tried plenty of keyboard (I have more than 20 at home, no kidding!) I stayed with the Microsoft Natural 4000 keyboard. It might be huge, but I can type very well on it.
I don't know of any keyboards like that, but what might help is a keyboard with a built-in touchpad (like for a laptop) that you can use instead of your other mouse for some of your mousing: small adjustments, quick taps to click, etc, to avoid having to go out to the mouse.

Resources