qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.8k stars 38.15k forks source link

custom firmware layout independent of OS-layout #76

Closed plgruener closed 8 years ago

plgruener commented 8 years ago

(Not a real issue of qmk, but trying to get input/discussion)

My goal: creating a firmware-based layout (of neo2, see www.neo-layout.org ; needs massiv unicode support, but that's not the issue here). That should work independent of the PC I plug my ergodox EZ in. Question: does the OS-defined Keyboard-layout (whatever this is really called) interfer with this, i.e. do I get different letters pressing the same key under the US and german map? If yes, what to do?

eltang commented 8 years ago

Congratulations on learning an alternative layout!

I had this issue as well, and it caused me to think that my keyboard was broken for a moment. Basically, changing the keyboard layout on a computer using software will cause any keypress the computer receives, regardless of the layout of the keyboard that sent it, to be translated. Therefore, you will have the set your computer to its default layout when you use your ErgoDox.

jackhumbert commented 8 years ago

You'll need to either use the US (qwerty) keymap on your OS and program your layout into your firmware, or use your German/Neo2 keymap on your OS and program a standard layout into your firmware - other variations will work, but it'll take some experimentation to figure out!

I don't know what OS you're using, but xmodmap is one way to do it on the OS side.

plgruener commented 8 years ago

I know I can do it on OS-side (that's how neo currently handles it, via xkbmap), but I want to be able to use the ErgoDox also on foreign computers – where I potentially cannot install any keyboard-drivers.

@Eric-L-T the Problem is: what's a computer's default layout? Here in Germany it's the German (Iso)-Layout, my laptop is set to neo by default.

I suppose all keycodes are based on qwerty (US), so I'd have to use qwerty on all computers?

jackhumbert commented 8 years ago

It's gonna depend on what locale that computer is set to :/ If it's a US one, it'll be qwerty, and you can use the keycodes at face value. Anything else, and there will need to be some conversion.

You could have a layer for each (much like the qwerty, colemak, dvorak layouts on the default Planck layout) and switch between them depending on which OS-side keymap the computer is set to.

plgruener commented 8 years ago

Thanks, that's indeed an interesting Idea. I already wanted to built in an extra qwertz-layer (for games etc). But I'd have 2 layers minimum for each , right? (lower-& uppercase). I'll test it out as soon as I got my board.

(can be closed for now)

jackhumbert commented 8 years ago

Yeah, two per layer sounds right! You have 32 to use, though :)