Why is numlock off by default? - keyboard

Is there any specific reason for that? Any thought would be appreciated.
Not looking for how to enable it.

It depends. The numlock might be disabled (turned off) for some laptops and netbook keyboards due to the fact that in some cases the keyboards save area by assigning {4,5,6} to the keys {u,i,o}, and {1,2,3} to {j,k,l}. If numlock is turned on these keys will not function. Many laptops an internal keyboard with no numlock. Turning numpad on disables a lot of keys on those keyboards, and maps them to numbers.
On desktops it is just a matter of preference. Either you boot with numlock on and use the numberpad, or you boot with numlock off and use the cursors on it.
While most 'modern' keyboards now come with a dedicated cursor and a 6 key PgUp/Down/Home/End/Del/Insert block the choice is no longer as important as it used to be.

Related

How to replace non existing key with software key?

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.

Changing the keystrokes of a USB keyboard

Every time a key is pressed on a regular keyboard, a numeric 'key code' is sent to the computer, eg. 32 or 51 which represent specific keys.
Unrelated to my default keyboard which I am using to type this post, I want to be able to plug in a keyboard via USB and have its key codes all shifted up by some constant C.
Thus, when pressing the 'a' key on this side keyboard, the computer would not receive the keycode for 'a', but rather some higher number which the computer does not have a planned response to.
These out-of-conventional-range keystrokes will control a program of mine which knows what they are and will be listening for them.
Hardware or software solution would work for me. Perhaps there are special keyboards sold for this end, or maybe some software-related modification could let this be accomplished for any regular keyboard-- I have no idea. What is crucial is that the keycode shift applies only for my side keyboard and not my default keyboard which I use for regular stuff.
I'm on Windows.
I think you are restricting yourself far more than necessary.
For starters, your description of USB keyboards is simplified a lot. The situation is a bit more complex than that. For instance, you actually get key-down/key-up sequences. (Also known as make and break).
The next thing is that you're making assumptions about the handling of the keyboard by the OS. If the second keyboard claims it's an USB keyboard, it will be handled by the OS driver for USB keyboards. That will not expect shifted values. For instance, on Microsoft Windows, the following behavior is documented:
Avoid Set 1 scan codes above 0x79,
since the release (key up) code would
be 0xFA or greater, and the keyboard
driver is known to interpret such
values as responses from the 8042
chip, not as keystrokes (scan codes).
Next, an OS will assume that an extra keybaord will provide extra keys, and handle it directly. For instance, there are numeric USB keyboards available for laptops, and Windows just treats them as extra 0-9+-/*= keys. It doesn't care that they're on separate hardware. Basically, I don't think this second keayboard idea will fly.
Now USB usually treats keyboard as a special case of a more generic class, which is more flexible: HID = Human Input Devices. . For instance, USB joysticks are also Human Input Devices, and a typical OS doesn't try to interpret joystick buttons. Games are expected to handle them directly, and so could your app.
Well it sounds like you'll need more of a hardware solution than a programming solution. Try this http://www.instructables.com/id/Hacking-a-USB-Keyboard/

Doing something with the numeric keypad

I, like most people, don't use the numeric keypad on my keyboard much and they seem to me to be a complete waste of otherwise perfectly good eighteen keys.
I was wondering if there was something cool that could be done with them - I've heard of some people controlling their mouse pointer using the 2, 4, 6 and 8 keys, but that does seem very practical to me.
Any ideas?
Low tech solution:
Remove the keys (easy with a pencil) so the key won't exceed the border, then you could glue a piece of wood over it and get a cup holder.
I use my keypad keys for adding, subtracting, multiplication, division, numerical data entry, etc. Now I'm going to use my CTRL, SHIFT, and W keys together to try and figure out what this has to do with programming...
Why not create a custom keyboard layout?
Real languages often have special characters you could put there.
Alternately if you use APL you could put their 'unique' characters in there.
Try using AutoHotKey http://www.autohotkey.com/, and setting up some hotkeys for common tasks that you perform, for example:
Opening my computer
Opening your data folders
Opening web browser
Copying as plain text
Sleeping the computer
Etc.

How do I get my hands on a Dvorak keyboard?

I've always assumed that before I can use the Dvorak layout I need to purchase a Dvorak keyboard. But I can't find one on Amazon. Is it simply a matter of popping the keys off a Qwerty keyboard and moving them around?
To help you learn your way around the keyboard layout, you can physically rearrange the keys on your Qwerty keyboard. Or you can simply re-label the keys with stickers. I personally learned to type using the Dvorak layout without re-labeling or re-arranging keys, and found that it was not difficult.
Most modern OSes allow you to remap any keyboard to the Dvorak layout.
Windows XP/Vista: you can set
your mappings through Control
Panel->Regional and Language
Options->Languages->Details....
Mac OSX: System Preferences -> International -> Input Menu (thanks jmah)
Ubuntu: System -> Preferences -> Keyboard, Layouts Tab, Add..., Select the Devorak layout of your choice and optionaly set as default. You can then right-click your panel, select "Add to panel" and choose keyboard indicator. You can then switch between layouts. (Thanks Vagnerr)
If you are a touch typer, you will benefit greatly from the Dvorak layout.
The way I taught myself Dvorak as a touch typer was to tape a small copy of the layout to my monitor. Then I practiced typing by looking at the copy instead of the keys.
That was six years ago. I still use stardard Qwerty keyboards, but I haven't looked at what the keys says since I first learned to touch type 20 years ago.
You could go with Das Keyboard Ultimate, which has no letters on the keys. You will become a touch Dvorak typist in no time flat. Or you could wimp out and put labels on the keys.
I learned Dvorak by changing the layout using the OS. I printed out a keyboard layout and taped it below my monitor so I could refer to it without looking down at the keys.
Later, once I learned where the keys were, I printed out stickers and put them on the keys caps.
To this day, I just rely on the OS layout switching to get Dvorak.
I tried to rearrange the letters once, on some keyboards it doesn't work. Since the letters are different in shape based on the row they are in.
Well if you have a fat wallet then an Optimus Keyboard would give you Dvorak(and qwerty and azerty and any combination!)
You can just rearrange your keys on your current keyboard and change the layout.
Here is the key layout:
I'm not seeing the image, so here is the direct link.
If you're going to rearrange the physical keyboard, go for a Model M with removable key caps.
Switchable between qwerty and Dvorak: DvortyBoard
Cheap, but you need the OS to remap the keys: Hooleon
Don't get a dvorak keyboard. Non-touch-typing dvorak is as bad for your wrists, and as slow, as non-touch-typing qwerty. There is absolutely no point. You want to get out of that habit.
Change the layout in your OS and learn not to rely on looking at the keyboard. If anything, pop off the keycaps and put them back in randomly. If you absolutely must buy new hardware, get a Das Keyboard or any other blank keyboard.
I got two of these (one for work and one for home), and I love them:
http://matias.ca/dvorak/
It's also switchable via a button to Qwerty, as a concession to your colleagues who may need to type on it.
My only complaint is a very minor one: after 4 years, some of the labels started to fade or scratch off.
If you're just learning Dvorak, good luck. The best thing I did is switch to it 100% of the time. When I was switching back to Qwerty for speed, all I did was scramble my brain. Dvorak will be slower while you're on the learning curve, but it's well worth it. A lot less stress on the fingers in the long run, and after 12 years, I actually type faster on Dvorak than I ever did on Qwerty.
Best way to practice: open a book or magazine and copy some paragraphs in Dvorak. If you find a tricky paragraph, type it out two or three times until the patterns start to become muscle memory.
Good luck!
You'll have trouble getting the keys to fit (perhaps you could just draw over them) but yeah, you should be able to switch layout within the OS.
I don't know how much you are prepared to invest, but I think the Optimus Maximus keyboard from Art Lebedev Studios would be a good choice, since you can switch keyboard layout quite easily and no need for the key pop-up.
On most PC keyboards the keys have in each row have a different shape. The tops of the keycaps are at a different angle. This provides a slight front-to-back curvature of the top surface of the keys. (You can see this if you peer at the keys from the side).
If you go moving keys between rows, the tops of the keys will not line up... the keyboard will look strange and feel "bumpy" and uneven. Not good for touch typing.
Solutions:
A flat keyboard - a few manufacturers produce keyboards where all the keycaps are the same shape. Apple and Sun keyboards are like this, and I think most Logitech keyboards too... But be careful of the new Apple aluminium keyboard -- it may be harder to remove the keycaps safely.
Also, you are best starting with a US QWERTY keyboard. Other national layouts have some different keys, and you won't be able to get standard Dvorak by re-arranging.
You could try getting a custom keyboard from Unicomp. They offer an IBM buckling spring style keyboard called the "Customizer 104/105" that is available in many different languages, including US-Dvorak if you ask for it. I have purchased a couple of keyboards from this company and the quality is top notch. If you want a new buckling spring keyboard, this is the only company that I am aware of that offers them.
This keyboard is hardwired so you don't have any of the issues that you would have if you switch the keyboard layout in the OS - like your log-in key map being different than your account key map, or problems with remoting into another computer.
Unicomp Keyboards
You can just change the layout in your OS. It actually would be better not to get a Dvorak keyboard so you can learn Dvorak without being dependent on looking at the keys. A great typing tutor to help you learn is Stamina Typing Tutor (just google it), which has an on screen keyboard so you don't have to look at your keys. And when you aren't just practicing you can print out the Dvorak layout from Google images and refer to that as you type. If you really want to get a hardwired keyboard search Matias Dvorak on Amazon. That's the only keyboard I could find on Amazon that was Dvorak, and it has a button to switch between Qwerty and Dvorak. I would not rearrange your keys though since most OS's don't switch to Dvorak until the user logs in.

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

Resources