Modifiers with layers.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
Hi! Is it possible to programm a keyboard controller, to have layers with modifiers, as ALT, CTRL, etc.?
As far as I understood it, something like ALT + F4 is sent from the keyboard controller as two separate scancodes to the OS. The OS interprets is as “close application”. So the keyboard controller isn’t responsible for these key combinations, it is the OS, which we can’t (or don’t want to) mess with.
But what about a layer key, which simulates to be ALT, for example FN, and when I press FN+F4 it sends ALT+F4 to the OS. Key combinations which aren’t defined yet by the OS could be user-defined.
As far as I understood it, something like ALT + F4 is sent from the keyboard controller as two separate scancodes to the OS. The OS interprets is as “close application”. So the keyboard controller isn’t responsible for these key combinations, it is the OS, which we can’t (or don’t want to) mess with.
But what about a layer key, which simulates to be ALT, for example FN, and when I press FN+F4 it sends ALT+F4 to the OS. Key combinations which aren’t defined yet by the OS could be user-defined.
- ne0phyte
- Toast.
- Location: Germany
- Main keyboard: HHKB Pro 2
- Main mouse: Mionix Avior 7000
- Favorite switch: Topre 45g, MX Blue
- DT Pro Member: 0003
Same as last thread: you can do anything you want. This is all functionality on the controller side.
The controller tells the OS what keys/mods are pressed. How you map the physical keys to scancodes is your decision.
Keyboard: sends scancodes
OS: maps scancodes to symbols
How/where you let the keyboard send those scancodes doesn't matter to the OS.
The controller tells the OS what keys/mods are pressed. How you map the physical keys to scancodes is your decision.
Keyboard: sends scancodes
OS: maps scancodes to symbols
How/where you let the keyboard send those scancodes doesn't matter to the OS.
-
- Location: USA
- Main keyboard: KBC Poker MX Red
- Main mouse: Logitech MX Revolution
- Favorite switch: MX Red
- DT Pro Member: -
Right... make programming a multi key macro. So on the Fn layer F4 would = ALT+F4, you could do X to be CTRL+X and so on.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
Alright, let’s get specific. I want to tell the controller, that it sends the Yen character “¥” when I press ALT+Y (controller-side scancode interpretation). It is possible to do this with a Numpad-Code.
As IvanIvanovich says with a Fn layer, which simulates Fn+F4=>ALT+F4, Fn+O=>ALT+O, etc. Adding Fn+Y=>“¥”. Fine. But isn’t there a problem when things get complicated, e. g. ALT+CTRL+DEL?
As IvanIvanovich says with a Fn layer, which simulates Fn+F4=>ALT+F4, Fn+O=>ALT+O, etc. Adding Fn+Y=>“¥”. Fine. But isn’t there a problem when things get complicated, e. g. ALT+CTRL+DEL?
-
- Location: USA
- Main keyboard: KBC Poker MX Red
- Main mouse: Logitech MX Revolution
- Favorite switch: MX Red
- DT Pro Member: -
Nope. I had assigned some macros on my Access IS when I had set it up to use with Traktor DJ for example one key would have macro that would load selected track to deck B set sync to BPM with deck A and play which ended up being some string of several keys.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
@IvanIvanovich I mean, how to simulate key combinations with three keys, as ALT+CTRL+DEL with the proposed Fn layer? Maybe Fn+CTRL => ALT+CTRL (which, pressed together with DEL gives ALT+CTRL+DEL)? Does this work?
- ne0phyte
- Toast.
- Location: Germany
- Main keyboard: HHKB Pro 2
- Main mouse: Mionix Avior 7000
- Favorite switch: Topre 45g, MX Blue
- DT Pro Member: 0003
You can put a macro with any amount of mods and keystrokes on a single key. I don't understand the question.
Have you looked into the documentation of TMK Keyboard to see what's possible without actually writing code?
> https://github.com/tmk/tmk_keyboard/blo ... /keymap.md
Have you looked into the documentation of TMK Keyboard to see what's possible without actually writing code?
> https://github.com/tmk/tmk_keyboard/blo ... /keymap.md
-
- Location: USA
- Main keyboard: KBC Poker MX Red
- Main mouse: Logitech MX Revolution
- Favorite switch: MX Red
- DT Pro Member: -
Do you have a keyboard that has no right Alt/Alt Gr and you want to make it's Fn key an Alt Gr? Otherwise, I guess you could make an Alt lock layer, where when you press FN+some key it sets FN to ALT. But you would need to map a Fn to somewhere else on that layer so you could leave it.
It still would make more sense to me to make macro functions really. A macro can be several keys, entire text strings ie a password, pretty much any keys available in any combination. So you could press Fn+Del and have that send CTRL+ALT+DEL or whatever.
It still would make more sense to me to make macro functions really. A macro can be several keys, entire text strings ie a password, pretty much any keys available in any combination. So you could press Fn+Del and have that send CTRL+ALT+DEL or whatever.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
No, I have an Alt/Alt Gr key and would like to use unassigned combinations with Alt for user-defined characters. Just as Alt Gr + E invokes the Euro sign “€” in my layout, I’d like to add the Yen symbol “¥” to Alt Gr + Y, while keeping all standard key combinations with Alt/AltGr. By creating a Fn layer I can simulate all combinations with Alt + another key, but how to simulate combinations with Alt + _two_ other keys, as Alt+Ctrl+Del? AFAIK a layer works like "press two keys together" not "press three keys together".IvanIvanovich wrote:Do you have a keyboard that has no right Alt/Alt Gr and you want to make it's Fn key an Alt Gr?
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Answer: macros.
Download Soarer's converter, and have a look in the /docs folder. You'll find out everything you can do with a Teensy.
http://deskthority.net/resources/file/6142
His documentation is pretty thorough. So definitely check it out, before we all start doing Kbdfr impressions…
Download Soarer's converter, and have a look in the /docs folder. You'll find out everything you can do with a Teensy.
http://deskthority.net/resources/file/6142
His documentation is pretty thorough. So definitely check it out, before we all start doing Kbdfr impressions…
-
- Location: USA
- Main keyboard: KBC Poker MX Red
- Main mouse: Logitech MX Revolution
- Favorite switch: MX Red
- DT Pro Member: -
Oh I see. For other characters I use semi regularly not on my regular US or RU keymap... and since I use 60% most of the time and have no numpad I couldn't make ALT+code either. I just created a custom keymap in the OS. Sure, I could have just use US INTL... but the dead keys annoyed me. So anyway, I just press Alt+Shift to go to my keymap... press 1 key (€,£,È, etc.), switch back. It might be easier to create/customize your usual keymap in OS than programming firmware if you don't take the keyboard around to multiple computers all the time. Can't do macro with multi key strings that way though.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
If I assign on the FN layer the physical Ctrl key to the scancode "Ctrl" and the physical Del key to the scancode "Del + Alt" then I could press Fn + Ctrl + Del to get to the task manager, right? Then this would complete the simulation of an Alt key with advanced features. With a dirty trick however.
So many problems, because too many cooks spoil the broth. One cook is the keyboard controller, the other cook if the operating system.
So many problems, because too many cooks spoil the broth. One cook is the keyboard controller, the other cook if the operating system.

-
- Location: USA
- Main keyboard: KBC Poker MX Red
- Main mouse: Logitech MX Revolution
- Favorite switch: MX Red
- DT Pro Member: -
Well you could, but that doesn't make sense since you still have to press the same amount of keys. The whole point of macro to me is to make it so you have to press 2 keys at most. For example to make a macro that invokes sleep... Win+X+U+L so instead of pressing all that, you could press fn+S and have the same result.
- Eszett
- Location: Germany
- Main keyboard: Filco Majestouch 2 TKL DE MX blue
- Main mouse: Logitech MX Master 2S
- DT Pro Member: -
Yes, but my aim isn’t to make something easier with macros, but to keep the Alt key behaving as normal Alt in all the key combinations Alt is usually involved in, while adding the feature that Alt+Y invokes the Yen-Symbol (by a macro that sends a numpad code for the Yen-Symbol).IvanIvanovich wrote:Well you could, but that doesn't make sense since you still have to press the same amount of keys. The whole point of macro to me is to make it so you have to press 2 keys at most.
I think an alternative method to the Fn layer method, which only simulates Alt actions, could be this:
-- If Alt is pressed send Alt scancode (as default)
-- Until Alt is released check if Y is pressed
-- if "Y" is pressed, send [numpad code for the Yen Symbol "¥"].
What do you think?