Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dvorak / Qwerty Keyboard Variant
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
crzysdrs
n00b
n00b


Joined: 07 Sep 2006
Posts: 2
Location: Oregon, USA

PostPosted: Thu Dec 27, 2007 5:19 pm    Post subject: Dvorak / Qwerty Keyboard Variant Reply with quote

I recently switched to Dvorak and I read about an interesting Mac keyboard variant that allows you to use qwerty key commands when you are pressing the Control key. I thought that was a great idea and since there was no implementation on linux (that I found) I decided to make my own. However, I am having troubles generating the actual control key sequences. Right now I am able to generate qwerty character keypresses when holding the control key, but that isn't quite what I am going for. Since I only started learning about XKB yesterday I may be missing something totally obvious but here is what I have so far.

So I created a new type that is intended to use dvorak lowercase characters for no modifiers (level1), dvorak upper case characters (level2), and qwerty control keys (level3).

Appended to /usr/share/X11/xkb/types/basic
Code:


    type "CONTROL_Q" {
        modifiers = Shift+Lock+Control;
        map[None] = Level1;
        map[Shift] = Level2;
        map[Lock] = Level2;
        map[Control] = Level3;
        level_name[Level1] = "Base";
        level_name[Level2] = "Caps";
        level_name[Level3] = "Control";
    };



So with this type I simply copied the dvorak variant and added the third column with qwerty key equivalents.

Appended to /usr/share/X11/xkb/symbols/us
Code:

// Mitchs Dvorak/Qwerty Variant

partial alphanumeric_keys
xkb_symbols "dvorakqwerty" {

    name[Group1]= "U.S. English - Dvorak/Qwerty";

    // Alphanumeric section

    key <TLDE> { [       grave, asciitilde ]  };

    key <AE01> { [          1,  exclam   ] };
    key <AE02> { [          2,  at     ] };
    key <AE03> { [          3,  numbersign ] };
    key <AE04> { [          4,  dollar  ] };
    key <AE05> { [          5,  percent  ] };
    key <AE06> { [          6,  asciicircum  ]  };
    key <AE07> { [          7,  ampersand ] };
    key <AE08> { [          8,  asterisk ] };
    key <AE09> { [          9,  parenleft ] };
    key <AE10> { [          0,  parenright ] };
    key <AE11> { [ bracketleft, braceleft ] };
    key <AE12> { [ bracketright, braceright ]   };

    key <AD01> {
        type = "CONTROL_Q",
        symbols[Group1] = [  apostrophe, quotedbl, q ]
    };
    key <AD02> {
        type = "CONTROL_Q",
    symbols[Group1] = [ comma,  less,  w ]
    };
    key <AD03> {
        type = "CONTROL_Q",
        symbols[Group1] = [      period, greater,e ]
    };
    key <AD04> {
        type = "CONTROL_Q",
        symbols[Group1] = [         p, P,  r ]
    };
    key <AD05> {
        type = "CONTROL_Q",
        symbols[Group1] = [         y, Y, t ]
    };
    key <AD06> {
        type = "CONTROL_Q",
        symbols[Group1] = [         f, F, y ]
    };
    key <AD07> {
        type = "CONTROL_Q",
        symbols[Group1] = [         g, G, u ]
    };
    key <AD08> {
        type = "CONTROL_Q",
        symbols[Group1] = [         c, C, j ]
    };
    key <AD09> {
        type = "CONTROL_Q",
        symbols[Group1] = [         r, R, o ]
    };
    key <AD10> {
        type = "CONTROL_Q",
        symbols[Group1] = [         l, L, p ]
    };
    key <AD11> { [      slash,  question ] };
    key <AD12> { [      equal,  plus    ] };

    key <AC01> {
    type = "CONTROL_Q",
    symbols[Group1] = [     a,  A,  a  ]
    };
    key <AC02> {
    type = "CONTROL_Q",
    symbols[Group1] = [     o,  O,  s  ]
    };
    key <AC03> {
        type = "CONTROL_Q",
        symbols[Group1] = [         e, E, d ]
    };
    key <AC04> {
        type = "CONTROL_Q",
        symbols[Group1] = [         u, U, f ]
    };
    key <AC05> {
        type = "CONTROL_Q",
        symbols[Group1] = [         i, I, g ]
    };
    key <AC06> {
        type = "CONTROL_Q",
        symbols[Group1] = [         d, D, h ]
    };
    key <AC07> {
        type = "CONTROL_Q",
        symbols[Group1] = [         h, H, j ]
    };
    key <AC08> {
        type = "CONTROL_Q",
        symbols[Group1] = [         t, T, k ]
    };
    key <AC09> {
        type = "CONTROL_Q",
        symbols[Group1] = [         n, N, l ]
    };
    key <AC10> { [          s,  S      ] };
    key <AC11> { [      minus,  underscore ] };

    key <AB01> {
        type = "CONTROL_Q",
        symbols[Group1] = [   semicolon, colon, z ]
    };
    key <AB02> {
        type = "CONTROL_Q",
        symbols[Group1] = [         q, Q, x ]
    };
    key <AB03> {
        type = "CONTROL_Q",
        symbols[Group1] = [         j, J, c ]
    };
    key <AB04> {
        type = "CONTROL_Q",
        symbols[Group1] = [         k, K, v ]
    };
    key <AB05> {
        type = "CONTROL_Q",
        symbols[Group1] = [         x, X, b ]
    };
    key <AB06> {
        type = "CONTROL_Q",
        symbols[Group1] = [         b, B, n ]
    };
    key <AB07> {
        type = "CONTROL_Q",
        symbols[Group1] = [         m, M, m ]
    };
    key <AB08> { [          w,  W      ] };
    key <AB09> { [          v,  V      ] };
    key <AB10> { [          z,  Z      ] };
};


However, with this current setup it types the actual qwerty characters. For example when I hit 'c' (on my qwerty keyboard), it types a dvorak 'j' and when I hit ^C it types a a character 'c' and does not create a ^C as I would hope. This is probably incomplete at the moment and lacking some keycodes but I am aiming to get it working the way I would expect it to first. Does anyone have any suggestions or is this even possible? I read a lot of comments on the forums asking for this variant so I figure it might come in handy.
Back to top
View user's profile Send private message
rjmars97
n00b
n00b


Joined: 08 May 2006
Posts: 51
Location: Idaho

PostPosted: Wed Jan 02, 2008 4:47 pm    Post subject: Reply with quote

This is an interesting idea, as one of the main issues with Dvorak in that keyboard shortcuts no longer are placed in convenient areas. I've been using Dvorak for more than 6 months now and the shortcuts were one thing that bothered me at first, but I am accustomed to now. Unfortunately, I can't really help in this question, but I'd be interested if you did find a solution.
_________________
I opened Pandora's box, let the cat out of the bag and put the ball in their court.
-- Hon. J. Hacker (The Ministry of Administrative Affairs)
Back to top
View user's profile Send private message
brycecovert
n00b
n00b


Joined: 29 Apr 2008
Posts: 1

PostPosted: Tue Apr 29, 2008 9:03 pm    Post subject: Reply with quote

Sorry for resurrecting this thread, but I found it very useful to me, and I believe that I have found the solution. All you have to do is add "preserve[Control] = Control;" to your type.

Good luck!
Bryce
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum