Customised programs for Dvorak - dvorak

I have not configured much keybindings due to my change from QWERTY to Dvorak, 4 months ago. I am using a programmer version of the layout. I find many terminal-based programs, such as Elinks and Vim, easier to use. The experience raises a question:
Which programs are customised for Dvorak?
[Some Elaborating] The term "customised program" means that you can easily use a Dvorak with the program. At least for me, Dvorak has opened my eyes to the shortcuts that I found odd earlier. How about you? Please, do not hesitate mention the programs.
[My Findings]
Opera browser
Opera's keys, such "CTRL+A", "CTRL+E", "CTRL+D" and "CTRL+H", are on the home row in Dvorak. Then, have a look at Qwerty: not on the home row. Is Opera customised for Dvorak or vice versa? Or is it just because of Unix? Earlier, I used Firefox 95% of my time. Now, the ratio is 40% for Firefox.
Terminal apps
The answers have mentioned terminal apps, such as GNU Screen. I am interested to know more about them.

I've been using Dvorak for 10+ years now, and actually have found that most of the QWERTY keybindings are actually just fine on a Dvorak layout.
But, since you're looking for things to customize, I have made extensive bindings changes in gnu emacs for my favorite bindings. It's fully customizable, and a great editor. My .emacs file has over 15 years of changes in it -- I'm sure others here have been using it for much longer than that!
Another great program to customize for keybindings is gnu screen, which I'm beginning to use extensively on the machines that I administer remotely.

My two cents: use AutoHotkey / IronAHK to remap hotkeys globally or for specific keybinds that cause you grief. Since switching to Dvorak a few years ago, I've've only had one such problem, but it's a big one: the hotkeys for cut, copy, and paste are placed awkwardly on Dvorak compared to pressing ctrl+x/c/v.
The keys are obviously meant to be adjacent and close to the control button, so globally remapping these keys is a great solution for me.
^q::^x
^j::^c
^k::^v
That way, you can use whatever programs you like, and bend them to your will.

I learned Vim on Qwerty, but I prefer Dvorak for typing English, so I use qwerty2dvorak (http://www.vmunix.com/vim/howto/dvorak.html) which lets me use Qwerty to tell Vim what to do (ie, hjkl) and Dvorak to type text.

I just set my keyboard on Dvorak, and go. I use the dvorak layout for all my command keys, and you get used to it very quickly. Apple (and others) do have layouts set up where the layout is Dvorak for normal typing, but querty when the command key is used.
Whatever you do, just pick something simple and stick with it. If you're having to use different keyboard shortcuts for different apps, you're likely to wear yourself down remembering all that.

Related

Configuring multiple keyboards for windows

This may seem on the surface to be a very basic question but its something I've never been able to do. And I'm wondering if someone can help as its really impacting my scripting!
I'm a Brit living in Japan, my computer keyboard is a Japanese model with all the icons in the Japanese place but my setup on windows is to think the keyboard is British- I'm just so used to everything been in its proper place and don't have to look at the keyboard to type.
For most purposes this is great.
However, I can't seem to be able to do a back slash. Where it should be in the bottom left is on a Japanese keyboard an extra big tab, back slash is instead over on the bottom right, near forward slash, a key which does nothing on my setup.
Does anyone know a way to configure windows 7 so that when I alt and shift to switch my typing language (something easy to do. Don't need help there) it also switches the type of keyboard it thinks I have. Or, even better, customise the layout of my keyboard.
Hope this doesn't get closed as many other config questions seem to have been as my being able to script depends upon this!

mouse capturing differences between Terminal.app with MouseTerm SIMBL plugin and iTerm2

iTerm2:
Mouse reporting works out of the box, works in Vim, works fully in Tmux, mouse wheel reporting works in Vim and for navigating Tmux history, but mouse wheel reporting does not work in manpages, does not work in git log, does not work in less
Terminal.app:
Mouse reporting does not work out of the box, but once installed mouse wheel reporting works everywhere including less and manpages and git log, etc. However mouse click+drag fails in Tmux, but still works in Vim.
So I'd rather use just one of these terminal apps, and I am particularly digging the immense feature set of iTerm2 (e.g. mouse-over to select which term to input to beats the hell out of anything Tmux can offer since it is zero keys to switch contexts) so I'd prefer if I can get mouse wheel reporting working fully in those programs.
I am having a hard time trying to debug the terminal codes being sent because the only way I can intercept them is through Vim, (as ctrl+V followed by scroll in my terminal will just have it scroll the terminal buffer) but Vim seems to be doing everything correctly.
Update: According to mouseterm project, it seems to be using a feature called "Simulated mouse wheel scrolling" to scroll programs like less... maybe I can configure iTerm to do the same. Somehow. I do believe PuTTY also accomplishes this, and I'd like to have at least the functionality I can get on Windows on the Mac... Nope, I'm just spoiled by the neatness of MouseTerm.
Although less (which is also used in git log) does not use mouse reporting itself,
iTerm2 can be configured to send up/down-arrow escape codes for scrolling
(from mouse wheel or trackpad two-finger swipe)
and less understands those.
See my answer
to a related question about how to set this up for iTerm2.
less does not actually recognize any terminal mouse events. (As such, tools that use it, like man and git log will not recognize mouse events either.) Something else you've done must be making it appear to support mouse events.
If you want the mouse wheel to work in your pager, you'll need to find a pager other than less which supports it. You might be able to put something together using view (vim in read-only mode), but applications like man which output content with control codes will be an issue there.

How to map Caps Lock to Esc for Vim in macOS?

I use vim to develop on my mac and I updated to Mountain Lion yesterday. I was using http://pqrs.org/macosx/keyremap4macbook/ this to remap the escape key's function to caps lock to switch between edit and insert modes. I can't really functionally develop in vim without this and it doesn't seem to work in Moutain Lion. I really need a solution soon!
Thanks a lot guys.
Found this:
https://github.com/tekezo/PCKeyboardHack/issues/8#issuecomment-7359829
It worked perfectly for me.
I had grown so accustomed to using caps-lock as esc, that it was killing my productivity until I found this.
You can achieve the same using the accessibility features of macOS. A usage example:
Map Caps Lock to Esc;
Map double Shift to Caps Lock.
To achieve (1) go to Settings > Keyboard > Special keys. In the appeared dialog set the desired mappings.
To achieve (2) go to Settings > Accessibility > Keyboard > Hardware > Activate lock keys.
So now if you have taps on you'll even have a logo on your screen notifying you about that.
NB. These are system-wide settings, not only for vim, but I believe it doesn't make a lot of sense to have a special mapping only for one editor, it will only make things more confusing.
NB. The Settings names could differ slightly for you, since I had to translate them from Dutch. Use some fuzzy logic to get to the right place.

TextMate Doesn't Like Programmer Dvorak Layout

I've been eager to try out the Programmer Dvorak keyboard layout, so I downloaded it from http://www.kaufmann.no/roland/dvorak/.
Strangely (to me at least), with it activated, I can't input anything into TextMate. TextMate is perfectly happy with the Dvorak options that come as standard with Snow Leopard, but this just shuts it down.
It seems ironic that a keyboard layout designed to maximize programming efficiency should be violently incompatible with an editor designed to do the same! How can I get TextMate to accept this new layout?
Hmm, curiously it seems to have started working now. Possibly I just needed to restart the computer?
In anycase I suspect this was a non-question - sorry!

Unable to use X clipboard in Screen

I read the following code in Unix Power Tools on page 117
*VT100.Translations: #override\
Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\
!Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0)
I have not managed to see any effect of the above code.
How can you use X clipboard in Screen, without your mouse?
Using the mouse. Left-click drag to select and usually the middle mouse button pastes but some terminals may differ (PuTTY uses right-click). If you only have two buttons you click them both together (left mouse button + right mouse button).
In reply to comment below ("Can you do it without your mouse?"):
ctrl-insert : copy
shift-insert : paste
shift-delete : cut
shift-ctrl-C : copy
shift-ctrl-V : paste
Not all applications will support the last three (though Konsole does). In fact most console applications will not allow you to delete text once it's printed.
As far as selecting text without a mouse I'm not sure there's a generic mechanism for that. It's probably terminal and/or application specific (ie, vim has it's own keys for marking and copying text - but only within vim). You could do it with mouse emulation but I'm sure that would be a painful process.
You can't use the traditional Mac/Windows shortcuts in a terminal because they were reserved for different actions long before these OS existed (ie, Ctrl-C terminates the running process).
I'm trying to use Ctrl-C in X
X does not handle these operations directly, they are handled by the application. That's why modern GUI programs like Firefox or Gedit support Ctrl-C for copy but terminals and command-line programs generally do not. As I said, it's a conflict in established conventions and Ctrl-C for kill got in first.
BTW, you could do some key-remapping if it drives you nuts but then you would be learning bad habits when you use a different machine. Best to just get used to it or do most of your editing in a GUI application.
More Information
EDIT: For a Mac, this may help: MacOSX-to-Konsole or This or This. It looks like you need to replace Ctrl with Command on Mac keyboards. It seems like Terminal the mac console has a right-click context menu for copy-paste so to do it the traditional way you me need to install a different console program or change some settings in Terminal.

Resources