How to use tiling window managers with winkeyless keyboards?
- Lustique
- Location: Germany
- Main keyboard: G81-3424LPNDE-0/00
- Main mouse: Kensington Orbit Scroll Ring Trackball
- Favorite switch: Buckling Cherry MY bruewck
- DT Pro Member: -
Hi everyone,
as far as I know there are a quite a few Unix/Linux people here that might use both old(er)/winkeyless keyboards and a tiling window manager. Thus, I thought I should try my luck here, after I tried to get help on reddit and unix.stackexchange.com, to no avail. I hope it's not off-topic:
I currently use a tiling window manager (xmonad, to be precise, but it probably doesn't matter), and for that I need a dedicated key on my keyboard to control my window manager. Anyone who has ever used one of those window managers (like awesome, i3, bspwm, dwm, ratpoison, spectrwm, xmonad, etc.) probably knows what I'm talking about. Whenever I'm using a keyboard with winkeys, I just use my left windows key (the right Windows key is ‘Compose’), because that's not getting used otherwise. If my keyboard doesn't have any Windows keys, I'm at a loss, though. In the past, I used a combination of control + alt as my WM control key, but as I later found out, this is a rather stupid idea if you're using, e.g., Emacs at the same time…
How do you guys do it? I already thought about using my Escape key (Escape when tapped, Mod4/‘Windows key’ when held), but apparently that doesn't work or isn't possible. I already asked about this on unix.stackexchange.com (see here) without any replies or upvotes, and also on reddit without any useful replies (because things like using my Capslock key for that, and similar things are out of the window (see question on Stackexchange)), so you're kind of my only hope, now.
as far as I know there are a quite a few Unix/Linux people here that might use both old(er)/winkeyless keyboards and a tiling window manager. Thus, I thought I should try my luck here, after I tried to get help on reddit and unix.stackexchange.com, to no avail. I hope it's not off-topic:
I currently use a tiling window manager (xmonad, to be precise, but it probably doesn't matter), and for that I need a dedicated key on my keyboard to control my window manager. Anyone who has ever used one of those window managers (like awesome, i3, bspwm, dwm, ratpoison, spectrwm, xmonad, etc.) probably knows what I'm talking about. Whenever I'm using a keyboard with winkeys, I just use my left windows key (the right Windows key is ‘Compose’), because that's not getting used otherwise. If my keyboard doesn't have any Windows keys, I'm at a loss, though. In the past, I used a combination of control + alt as my WM control key, but as I later found out, this is a rather stupid idea if you're using, e.g., Emacs at the same time…
How do you guys do it? I already thought about using my Escape key (Escape when tapped, Mod4/‘Windows key’ when held), but apparently that doesn't work or isn't possible. I already asked about this on unix.stackexchange.com (see here) without any replies or upvotes, and also on reddit without any useful replies (because things like using my Capslock key for that, and similar things are out of the window (see question on Stackexchange)), so you're kind of my only hope, now.
- AMongoose
- Location: Portugal
- DT Pro Member: -
I'm on i3 and even when I have a winkey i keep it as that and use capslock as my wm mod.
I guess it would depend on what keys you use for commands, I'm not familiar with xmonad, capslock works well for i3 because all the most used commands are on the right hand.
I guess it would depend on what keys you use for commands, I'm not familiar with xmonad, capslock works well for i3 because all the most used commands are on the right hand.
-
- Location: UK
- Main keyboard: Filco ZERO green alps, Model F 122 Terminal
- Main mouse: Ducky Secret / Roller Mouse Pro 1
- Favorite switch: MX Mount Topre / Model F Buckling
- DT Pro Member: 0167
I always remap caps lock if i don't have a winkey.
Also i3 for the win ! as much as i would like to use dwm its just too hardcore for me, would it kill them to have a config file ?
Also i3 for the win ! as much as i would like to use dwm its just too hardcore for me, would it kill them to have a config file ?
- Laser
- emacs -nw
- Location: Romania
- Main keyboard: Plum TKL \w Topre domes (work) / Novatouch (home)
- DT Pro Member: 0180
StumpWM user here, but my keyboards have a super/win key.
I use caps lock as the left ctrl - this means the left ctrl in the corner of the keyboard would be always free to be remapped to a win/super key instead.
EDIT: Did you try https://github.com/alols/xcape ? (Your Linux distro may have it as included/official package)
I use caps lock as the left ctrl - this means the left ctrl in the corner of the keyboard would be always free to be remapped to a win/super key instead.
EDIT: Did you try https://github.com/alols/xcape ? (Your Linux distro may have it as included/official package)
- Dingster
- Location: Slovenia
- Main keyboard: Novatouch
- Main mouse: MX518
- DT Pro Member: -
I use i3 and just have "set $mod Mod1" for alt. (Mod4 = win, Mod1 = alt). Also "setxkbmap -option caps:super" makes the caps behave like a winkey, but I've had issues with it. Just add "exec --no-startup-id setxkbmap -option caps:super" if you use i3, should work
- Lustique
- Location: Germany
- Main keyboard: G81-3424LPNDE-0/00
- Main mouse: Kensington Orbit Scroll Ring Trackball
- Favorite switch: Buckling Cherry MY bruewck
- DT Pro Member: -
Yes, Capslock would work well, inasmuch as most commands are on the right in xmonad, as well. The problem, however, is that while I currently use the QWERTZ layout (i.e. German ISO), I might switch to the Neo layout in the future, and there Capslock is used as the left modifier to use layer 3. So I can't really use Capslock for my Window manager.AMongoose wrote: ↑I'm on i3 and even when I have a winkey i keep it as that and use capslock as my wm mod.
I guess it would depend on what keys you use for commands, I'm not familiar with xmonad, capslock works well for i3 because all the most used commands are on the right hand.
See above.andrewjoy wrote: ↑I always remap caps lock if i don't have a winkey. […]
See above. ²Laser wrote: ↑StumpWM user here, but my keyboards have a super/win key.
I use caps lock as the left ctrl - this means the left ctrl in the corner of the keyboard would be always free to be remapped to a win/super key instead.
EDIT: Did you try https://github.com/alols/xcape ? (Your Linux distro may have it as included/official package)
Yes, I already tried something like this. I thought it might be a good idea to use Escape as an addtional modifier, because I don't think that I ever have to hold Escape down for anything. The idea was that I could retain normal Escape key behaviour for tapping by using xcape. I wrote a bit about what I tried in the unix.stackexchange question that I linked. For whatever reason, when I tried to set Escape to Mod4, I also set the ‘y’ key to Mod4, and I still have no clue why that happen{s,ed}.
I also don't know how well this would work in practice if I got it to work. Since I also use vim from time to time, an unresponsive Escape key would be almost as bad as a non-functioning Alt key in Emacs…
Dingster wrote: ↑I use i3 and just have "set $mod Mod1" for alt. (Mod4 = win, Mod1 = alt). Also "setxkbmap -option caps:super" makes the caps behave like a winkey, but I've had issues with it. Just add "exec --no-startup-id setxkbmap -option caps:super" if you use i3, should work
Since I use Emacs quite often, remapping the Alt key would not work out for me, I'm afraid. Using Capslock for Mod4 would not work out, either (see above).
- Laser
- emacs -nw
- Location: Romania
- Main keyboard: Plum TKL \w Topre domes (work) / Novatouch (home)
- DT Pro Member: 0180
The *other* solution would be to place a Hasu converter (ps2->usb (cheaper) or usb->usb) between your keyboard and the PC - in this way, you can use the TMK firmware to map the keys as you wish (fully programmable keyboard), including "dual-role" keys, so that the OS sees them already as the key codes you want.
-
- Location: CZ
- Main keyboard: Kinesis Advantage2, JIS ThinkPad,…
- Main mouse: I like (some) trackballs, e.g., L-Trac
- Favorite switch: #vintage ghost Cherry MX Black (+ thick POM caps)
- DT Pro Member: -
- Lustique
- Location: Germany
- Main keyboard: G81-3424LPNDE-0/00
- Main mouse: Kensington Orbit Scroll Ring Trackball
- Favorite switch: Buckling Cherry MY bruewck
- DT Pro Member: -
‘Update’: I just tried to remap my escape key to Super_L (via keycodes; escape is keycode ‘9’), and then just made my Super_L a Mod4 again. Obviously, this just removes my escape key, which doesn't help and prevents me from using xcape with it, but while both Super_L and my escape key were mapped to Mod4, and my ‘y’ stayed a simple ‘y’ key, my ‘9’ now puts out ‘9z’ and momentarily switches from ‘QWERTZ’ to ‘us’ and back…
Is keyboard configuration on Linux really such a buggy PITA, or am I just retarded?
Is keyboard configuration on Linux really such a buggy PITA, or am I just retarded?
Well, I really hoped I could achieve this software-wise, especially as Hasu converters aren't exactly cheap…Laser wrote: ↑The *other* solution would be to place a Hasu converter (ps2->usb (cheaper) or usb->usb) between your keyboard and the PC - in this way, you can use the TMK firmware to map the keys as you wish (fully programmable keyboard), including "dual-role" keys, so that the OS sees them already as the key codes you want.
I hadn't before, but I'm not interested in Colemak, to be honest. Both of the layouts you linked also seem to be made for ANSI keyboards, of which I have none. All my keyboards are ISO.
-
- Location: CZ
- Main keyboard: Kinesis Advantage2, JIS ThinkPad,…
- Main mouse: I like (some) trackballs, e.g., L-Trac
- Favorite switch: #vintage ghost Cherry MX Black (+ thick POM caps)
- DT Pro Member: -
It has little to do with Colemak besides being hosted on a Colemak forum by a Colemak advocate.
It isn't restricted to ANSI either:The Extend mappings are mostly positional so they'll work with any layout – even if some keys like A and ZXCVB might be easier to remember using Colemak or QWERTY.
- the main modifier is in the Model M's Caps Lock key position
Instead of an extra hardware key, the Extend mappings can use any key really as that extra "Fn"/Shift-type modifier, but usually it's CapsLock that gets the honor.
- the second symbolic chart shows an ISO layout
Symbolic chart of my Extend mappings. Greens, navigation; blue, mousing; orange, multimedia; gray, system/misc.
World/ISO board showing Windows mappings with MouseWheel R/L keys. [1st image: US/ANSI board with Linux mappings (missing the <LSGT> MouseKeysOn key).] - the author is an ISO advocate, because of an unrelated "angle mod" (shown in the next symbol chart and other threads there)
- Laser
- emacs -nw
- Location: Romania
- Main keyboard: Plum TKL \w Topre domes (work) / Novatouch (home)
- DT Pro Member: 0180
Actually, a PS2->USB converter using Hasu's *firmware* is very very cheap, you only need a Pro Micro, which is a few bucks.Lustique wrote: ↑ Well, I really hoped I could achieve this software-wise, especially as Hasu converters aren't exactly cheap…
- TuxKey
- LLAP
- Location: Netherlands
- Main keyboard: Leopold FC660C, Leopold FC660M mx-clears
- Main mouse: Apple Magic Trackpad, ducky Secret (PBT mouse)
- Favorite switch: Cherry MX-clear, Topre 45gr/55gr
- DT Pro Member: 0137
love linux but alas can't help i have never used a "tiling windows manager" my mates keep telling me it's the best ever..
so perhaps one day.. when this mac dies and i need to switch from vmware to a linux distro with good virtualization..
good luck mate.. hope you find a solution.. i do agree with laser if you can find a hardware solution that's better then tinkering with software avoids update problems and multiple systems usage..
Still i understand your need don't forget to backup and document you success (i'm sure you will get there) btw you can always try to see if the guys from "jupiterbroadcasting" know anyone that's a tiling windows manager nut to help out
so perhaps one day.. when this mac dies and i need to switch from vmware to a linux distro with good virtualization..
good luck mate.. hope you find a solution.. i do agree with laser if you can find a hardware solution that's better then tinkering with software avoids update problems and multiple systems usage..
Still i understand your need don't forget to backup and document you success (i'm sure you will get there) btw you can always try to see if the guys from "jupiterbroadcasting" know anyone that's a tiling windows manager nut to help out
- Lustique
- Location: Germany
- Main keyboard: G81-3424LPNDE-0/00
- Main mouse: Kensington Orbit Scroll Ring Trackball
- Favorite switch: Buckling Cherry MY bruewck
- DT Pro Member: -
I had another go, because I realised that while I have mapped my ‘Scroll Lock’ key to ‘mod3’, I never use it anyways, so I might as well just map ‘Escape’ to ‘mod3’, which is otherwise unused (‘mod3’, that is; and then use ‘xcape’). So I did the following:
Does anyone have any idea why this bullshit with the ‘y’ key keeps happening? I thought this somehow had something to do with ‘mod4’ already being used before I tried to map another key to it, but that doesn't seem to be the case…
Or am I misunderstanding what you mean by ‘having a look at this layout’? Were you suggesting that I have a look at the implementation and then try to hack something together myself?
Yes, of course, building one yourself would be very cheap, but I have no soldering equipment myself, and the only thing I did solder myself a couple of years ago with my father's old soldering iron was a replacement plug for an audio cable, so I also pretty much have no soldering experience, either…
I plan on getting some soldering equipment in the future, because I want to build my own keyboard (kit) some day, but at the moment this isn't really an option.
Code: Select all
$ cat .Xmodmap
add Mod3 = Scroll_Lock
Code: Select all
$ xmodmap -pm
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d), Hyper_L (0xcf)
mod3 Scroll_Lock (0x4e), Mode_switch (0xcb)
mod4 Super_L (0x85), Super_L (0xce)
mod5 ISO_Level3_Shift (0x5c)
Code: Select all
$ xmodmap -e "clear mod3"
$ xmodmap -pm
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d), Hyper_L (0xcf)
mod3
mod4 Super_L (0x85), Super_L (0xce)
mod5 ISO_Level3_Shift (0x5c)
Code: Select all
$ xmodmap -e "add mod3 = Escape"
$ xmodmap -pm
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d), Hyper_L (0xcf)
mod3 Escape (0x9), y (0x34)
mod4 Super_L (0x85), Super_L (0xce)
mod5 ISO_Level3_Shift (0x5c)
Yeah, sorry, I didn't realise this at first. The thing is, though, that I, for one, don't want to manually mess with my system files (which is something that I think I'd have to do to use this layout), and, while the extra navigation keys would be nice, ‘neo 3’ already has those (on layer 4), and I don't really need media keys.davkol wrote: ↑It has little to do with Colemak besides being hosted on a Colemak forum by a Colemak advocate.It isn't restricted to ANSI either:The Extend mappings are mostly positional so they'll work with any layout – even if some keys like A and ZXCVB might be easier to remember using Colemak or QWERTY.
- the main modifier is in the Model M's Caps Lock key position
Instead of an extra hardware key, the Extend mappings can use any key really as that extra "Fn"/Shift-type modifier, but usually it's CapsLock that gets the honor.- the second symbolic chart shows an ISO layout
Symbolic chart of my Extend mappings. Greens, navigation; blue, mousing; orange, multimedia; gray, system/misc.
World/ISO board showing Windows mappings with MouseWheel R/L keys. [1st image: US/ANSI board with Linux mappings (missing the <LSGT> MouseKeysOn key).]- the author is an ISO advocate, because of an unrelated "angle mod" (shown in the next symbol chart and other threads there)
Or am I misunderstanding what you mean by ‘having a look at this layout’? Were you suggesting that I have a look at the implementation and then try to hack something together myself?
Laser wrote: ↑[…]
Actually, a PS2->USB converter using Hasu's *firmware* is very very cheap, you only need a Pro Micro, which is a few bucks.
Yes, of course, building one yourself would be very cheap, but I have no soldering equipment myself, and the only thing I did solder myself a couple of years ago with my father's old soldering iron was a replacement plug for an audio cable, so I also pretty much have no soldering experience, either…
I plan on getting some soldering equipment in the future, because I want to build my own keyboard (kit) some day, but at the moment this isn't really an option.
- vvp
- Main keyboard: Katy/K84CS
- Main mouse: symetric 5-buttons + wheel
- Favorite switch: Cherry MX
- DT Pro Member: -
i3 user here. +1 for tilling window managers.
I would post a bug report to xmodmap maintainers about the "y" key.
There was a time when I used a keyboard without win keys too. I remapped right alt to Win key at first. I remapped left control to Win key later (mostly because some software needs both left and right alt keys but there is hardly any software which makes distinction between left and right control).
At the end, I built a custom keyboard which has many keys for modifiers easily accessible on thumbs. No hassle with modifiers now. I'm satisfied
I would post a bug report to xmodmap maintainers about the "y" key.
There was a time when I used a keyboard without win keys too. I remapped right alt to Win key at first. I remapped left control to Win key later (mostly because some software needs both left and right alt keys but there is hardly any software which makes distinction between left and right control).
At the end, I built a custom keyboard which has many keys for modifiers easily accessible on thumbs. No hassle with modifiers now. I'm satisfied
- Laser
- emacs -nw
- Location: Romania
- Main keyboard: Plum TKL \w Topre domes (work) / Novatouch (home)
- DT Pro Member: 0180
Or you could ask somebody else to do it for youLustique wrote: ↑Laser wrote: ↑[…]
Actually, a PS2->USB converter using Hasu's *firmware* is very very cheap, you only need a Pro Micro, which is a few bucks.
Yes, of course, building one yourself would be very cheap, but I have no soldering equipment myself, and the only thing I did solder myself a couple of years ago with my father's old soldering iron was a replacement plug for an audio cable, so I also pretty much have no soldering experience, either…
I plan on getting some soldering equipment in the future, because I want to build my own keyboard (kit) some day, but at the moment this isn't really an option.
You would need a Pro Micro and a 4-pin flat plastic connector similar to that which connects the ps2 wires to the pcb. And, optional but recommended, a micro-usb to mini-usb or micro-usb short adapter (stress-relief for the Pro Micro connection). This, assuming the Pro Micro would be placed inside the keyboard, and not used as a generic converter - in that latter case you would need a PS/2 female jack instead.