UltimateHackingKeyboard / agent

Ultimate Hacking Keyboard configurator
https://ultimatehackingkeyboard.github.io/agent/
Other
702 stars 77 forks source link

Add Neo2 preset keymap #678

Closed davidak closed 1 year ago

davidak commented 6 years ago

Here is a new issue to track progress since https://github.com/UltimateHackingKeyboard/agent/issues/91 was closed without adding it.

You find the layout with all 6 layers here: https://www.neo-layout.org/

mondalaci commented 6 years ago

Thanks for the report! This is currently blocked by #617.

2er0 commented 6 years ago

:+1:

tuxlifan commented 5 years ago

In the meantime I created a "Reverse" map that can be used to get back the letters a-z like in QWERTY when the OS-keymap is set to Neo2. i.e. when you switch to Neo2 on OS level and get lost but need desperately to type a certain command to launch a shell where "uiaeo" will restore your other keymap you can switch the UHK to this map and type as if it were QWERTY (with the caveat that only "-", "/" plus any level 2 or level 3 special characters you memorized from Neo2 already, are available...) RVS.json.txt

bjoernjacobs commented 4 years ago

Having Neo2 would be great. I just ordered my UHK and - to be honest - expected it to not have problems with any layout. Finding out that it is not supported yet (after I ordered) was a little bummer.

mondalaci commented 4 years ago

@bjoernjacobs You can already create a Neo2 keymap on the UHK. In case 4 layers aren't sufficient for you, I think Karel's UHK firmware fork provides more. We'll add more layers to the native UHK firmware and Agent eventually.

bjoernjacobs commented 4 years ago

@mondalaci Thank you for the fast feedback. If I can use the first 4 layers, I'm happy! (Layer 5 and 6 of Neo2 contain mainly greek letters which I do not need for coding)

mondalaci commented 4 years ago

If you guys think that Neo2 can already be implemented reasonably well on the UHK without #617 then please come up with a Neo2 UHK keymap, attach your configuration, and I'll add it to the official UHK configuration.

qux42 commented 4 years ago

I build up neo2 layout on a English base layout. It works really good. Sadly I'm in holidays, so I can't export it at the moment. I will do it at soon I'm back

Sam


From: László Monda notifications@github.com Sent: Monday, 10 February 2020 20:20 To: UltimateHackingKeyboard/agent Cc: qux42; Manual Subject: Re: [UltimateHackingKeyboard/agent] Add Neo2 preset keymap (#678)

If you guys think that Neo2 can already be implemented reasonably well on the UHK without #617 then please come up with a Neo2 UHK keymap, attach your configuration, and I'll add it to the official UHK configuration.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

skaldesh commented 4 years ago

@qux42 Hi, I did the same as you. Did you get it to work so that after pressing both Mod3 keys, you enter "Capslock" mode? I did not manage to get it work (but I tried it 2 years ago, dont know what changed)

evs-ch commented 4 years ago

Just in case someone might find it useful to have something to start with, here's my config with a rather basic neo2 layout I've made ages ago when I got the UHK. It works to have at least a basic neo-ish layout "in dire emergencies"; normally I just use the neo2 implementation in userspace with just a slightly modified qwerty layout on the UHK. No special unicode chars etc., of course, and whatever improvements there might've been in the recent month that might have allowed to implement it better are obviously not part of it yet :)

https://gist.github.com/evs-ch/4aa744a24c7a74e51b34f000d7299841

skaldesh commented 4 years ago

I created one as well and it is what I use every day. I am using macros to write ä,ö,ü,ß,… The only thing not working for me (apart from missing layers 5 and 6, obviously) is I can not switch to Capslock mode and on layer 4 I only added the keys I normally need, so it is not complete. It assumes standard en_US keyboard layout on the OS

https://gist.github.com/skaldesh/6322b54e180c54691357bea0604c9922

djmj0 commented 4 years ago

Hi,

i just received my UHK and i am totally impressed.

However, i am also an avid Neo2 user and as such i am looking forward to an official implementation to UHK.

Unfortunately, when trying to import the scripts from either @evs-ch or @skaldesh, i get the following error message: "Invalid configuration specified". Could someone point me in the right direction of what i am doing wrong? I downloaded both scripts as .json and tried to import them directly into Agent, please see the attached screenshot.

Thank you!

Screenshot from 2020-05-20 18-07-34

mondalaci commented 4 years ago

@djmj0 Thanks for the nice words and for reporting this issue!

@ert78gb I think Agent should be able import these configurations. Please look into this issue.

djmj0 commented 4 years ago

thank you for your quick response, @mondalaci . I am happy to help if there are questions.

lukaskawerau commented 4 years ago

@mondalaci - just adding a +1 on the import problem, I can't import the linked config either.

ert78gb commented 4 years ago

Sorry for the late answer but I was very busy in the last few days. I just now started to investigate the https://gist.github.com/skaldesh/6322b54e180c54691357bea0604c9922 file and there is 2 things:

My assumption is

ert78gb commented 4 years ago

The https://gist.github.com/evs-ch/4aa744a24c7a74e51b34f000d7299841 file has a same problem. Missing keymaps:

mondalaci commented 4 years ago

@ert78gb Regarding the invalid configuration file, please manually remove invalid switch keymap actions and reattach the file.

ert78gb commented 4 years ago

@mondalaci Ok, but in this case, these configs will contain only the neo2 keymaps.

mondalaci commented 4 years ago

@ert78gb Then please use the default configuration and add the Neo2 keymap. Both of the above configs are affected? If so, please fix both.

ert78gb commented 4 years ago

Both affected. The default user config extended with Neo2 config(s): Need to unzip them before the import. Please wait with the import until the #1254 PR is merged

default-user-configuration-with-skaldesh-neo2.json.zip

default-user-configuration-with-evs-ch-neo2.json.zip

ert78gb commented 4 years ago

The user config that contains all the 3 Neo2 config default-user-configuration-with-3-neo2.json.zip

mondalaci commented 4 years ago

As it turned out, the import config bug which has just been fixed by #1254 only affected the web demo of Agent. It seems that the attached configurations were edited by hand and are invalid.

@davidak @2er0 @tuxlifan @bjoernjacobs @qux42 @skaldesh @evs-ch @djmj0 @lukaskawerau Please export your current configuration for backup purposes, then download, unzip, and import the default-user-configuration-with-3-neo2.json.zip configuration.

This configuration contains the evs-ch forneo, evs-ch semineo, and skaldesh Neo keymaps. I'd like you to reach a consensus on which one of these is the best Neo2 keymap, and then we'll add it to Agent as a preset.

Please note that the related macros contained by @skaldesh's original keymap were removed as no macros can be used for keymap presets.

lukaskawerau commented 4 years ago

Thank you @ert78gb and @mondalaci for taking this on!
I'm very, very, very new to Neo, so my opinion should probably count the least when discussing which preset to use, but as far as I can tell @skaldesh's keymap seems to be the closest to the full Neo2 layout. I.e. in the lower left I think I see where the Umlaut-Macros were.

Since I'm using UHK on the Mac, will there be a Mac and PC version, like there is for Dvorak and Colemak?

mondalaci commented 4 years ago

I'm fine with having both Mac and PC Neo2 preset keymaps as long as you guys create them, and agree that they're the real deal.

skaldesh commented 4 years ago

Hey guys,
I would love to agree on one layout. Before we use mine, for example, as a basis, I would like to ask some questions:

Please note that the related macros contained by @skaldesh's original keymap were removed as no macros can be used for keymap presets.

@mondalaci is there any way to export macros as well? Without macros, some keys for Neo are not possible to write with the current UHK agent (mainly "…", "ä", "ö", "ü"). Maybe the macros could be offered in an extra file, for people who want to get as close to the Neo2 keymap as possible.

Furthermore, a huge disadvantage with my layout right now is that you can not press both Shift keys to switch to "Capslock" (in Neo2, the second layer). This is one of the greatest things in Neo2, that you are able to type in Capslock, but can still type all other special characters. I have not checked up on the features of the UHK in quite a while, so I am not sure whether something like this can be achieved now. It was not possible back when I created my keymap, though.

In case we want to use my keymap as basis (or any other), I can only help with PC Neo2 preset keymaps. @lukaskawerau you can do the Mac version, right?

lukaskawerau commented 4 years ago

This is the most faithful representation I could come up with, based on the Neo layout presented here. As @skaldesh says, the biggest problem atm is that the second NEO2 layer (Shift) isn't programmable, and some of the keys Neo2 requires aren't typable in macOS with a single stroke: on the US keyboard, ü requires Option+u+u to type ¨ first and then place a u under it.

Screenshot 2020-05-28 at 07 37 41 Screenshot 2020-05-27 at 15 34 41 Screenshot 2020-05-27 at 15 34 45 Screenshot 2020-05-27 at 15 34 48
mondalaci commented 4 years ago

@skaldesh The macros were removed to make preset keymaps self-contained and less complicated conceptually. It'd be quite strange from a user standpoint if macros were added when adding preset keymaps.

Do you use the US OS layout? I'm asking because I think by using DE, the "ä", "ö", "ü" characters would be easy to trigger without macros. I'm wondering whether every preset keymap should be created (even the ones besides Neo2) assuming that the user uses the US OS layout.

Layer switching via both Shift keys might be possible via Karel's UHK firmware fork, but I don' want to merge such niche features because, again, they'd make Agent less conceptually clean.

I'd much rather prefer using built-in UHK features for layer switching. Using the secondary role of Tab might be feasible for example.

@lukaskawerau Thanks for the great work! I'm trying to wrap my head around Neo2, but I'm unsure about how should its layers be triggered. There's a limited amount of English resources available, and I only found this Wikipedia section regarding the layers. According to this article, is it also possible to switch layers with "#" and "<" keys? Oddly, the both Shift layer switching method mentioned by @skaldesh is not even mentioned here. Some explanation on this would be much appreciated.

lukaskawerau commented 4 years ago

@mondalaci Happy to help!

One additional challenge is how to treat ANSI and ISO layouts - the way I've set up the layers Mod corresponds to Mod3 in Neo (-> Layer 3) and Fn corresponds to Mod4 (-> Layer 4) in Neo. Because ANSI and ISO differ, so does the placement of layer switchers.
Since I'm new to Neo2 as well, @skaldesh will need to comment on locking Layer 2 by tapping both shift keys.
But the general point is: since UHK doesn't expose the "Shift-Layer" (Neo Layer 2) for editing, that means that symbols such as € can't be placed where they would in Neo2.

kareltucek commented 4 years ago

(Layer switching with both shifts is possible on the fork (e.g., via ifKeyActive and toggleLayer), but the macro layer mechanism is not integrated with the official layer mechanism, which means that one may need to either to be careful about untoggling the layer again via some macro, or to entirelly switch to the macro induced mechanism, or to fire a ticket with description of the encountered problems and keep kicking me until I implement some fix.)

(More than four layers are also possible as mentioned above, but face the same limitation.)

skaldesh commented 4 years ago

@kareltucek Wow, I am just browsing your fork and it looks amazing! I need to spent some time with it, maybe I can finally have a fully functioning Neo2 layout.

@mondalaci Yes, I am using US layout.

Since I can't do anything with the regular features of the UHK to complete the Neo2 keymap, my layout config I posted above can be considered the best I can do. I would argue against making it some kind of ofiicial Neo2 preset, since it simply is not real Neo2.

mondalaci commented 4 years ago

@skaldesh When #617 gets done, will you be able to implement a UHK Neo2 keymap that you'd consider complete?

Is double Shift locking an official feature of Neo2?

skaldesh commented 4 years ago

Is double Shift locking an official feature of Neo2?

I think we overemphasized this a little bit. It is nothing more than the QUERTY equivalent of "Capslock". In Neo2, the Capslock key is used to activate Mod3 layer. By pressing both shift keys, you can permanently activate Mod2 layer (uppercase letters). The "special thing" is that whilst I have activated the Capslock mode, I can still press for example the Capslock key to activate Mod3 layer. This makes it possible to type in uppercase and still access all puncuation, numbers, arrow keys, etc etc like you would normally.
I hope I could clear it up a little bit.

Regarding whether this is an official feature, yes it is:

Drückt man die beiden Umschalttasten gleichzeitig, wird CAPSLOCK aktiviert. Und genauso deaktiviert.
-- https://git.neo-layout.org/neo/neo-layout/wiki/Tastaturbelegung#Ebene2

My rough translation: By pressing both Shift keys at the same time, CAPSLOCK is activated. And also deactivated [by pressing again]

There is also something mentioned on Wikipedia in section Layers of the Neo2 article:

The fourth level can be reached via Mod4 , which under QWERTY corresponds to the Alt Gr key and the < key, contains a numeric keypad and important navigation keys, so you do not have to take your hands off the main field to navigate in a text document. By making the navigation buttons accessible on the main panel, Neo also encounters the criticism expressed in reform keyboards that text editors like Vim would be more difficult to use. This level can be locked just like the second one.
-- https://en.wikipedia.org/wiki/Neo_(keyboard_layout)

skaldesh commented 4 years ago

@skaldesh When #617 gets done, will you be able to implement a UHK Neo2 keymap that you'd consider complete?

Tbh, I am not sure what #617 actually allows me to do. More layers sound promising, but what I miss the most for Neo2 is still the Neo2 capslock mode as described above, where I can access a layer (Mod3 and Mod4) from another layer (Mod2 in this case). Is that possible with the issue?

mondalaci commented 4 years ago

@skaldesh Thanks for the explanation! #617 may be useful for manipulating the scancodes of keys while modifiers are used, and more layers might also be useful, but it doesn't allow for the double shift feature of Neo2. We might merge some of Karel's advanced features over time to allow for double shift, but I don't plan to make a dedicated UI for such niche features in Agent.

skaldesh commented 4 years ago

We might merge some of Karel's advanced features over time to allow for double shift, but I don't plan to make a dedicated UI for such niche features in Agent.

!!! This is the way to go !!!

I understand your desire to keep the agent simple, there are countless discussions in this repo's issue about it. If we can make the "expert" features accessible in another way, I am totally fine with it.

kareltucek commented 4 years ago

We might merge some of Karel's advanced features over time to allow for double shift, but I don't plan to make a dedicated UI for such niche features in Agent.

!!! This is the way to go !!!

(It surely sounds good, but has a fair number of catches. Mainly, the command-driven way of triggering events also depends on the strongly generalized macro engine of the fork (since to be of any use, it has to be able to run multiple macros parallely along standard operation of the keyboard). While unification of the two implementations is surely desirable from my side, I cannot deny that the (forked) implementation is in a pretty bad shape and porting it partially or refactoring would be difficult.)

skaldesh commented 4 years ago

Update:
I discovered today, that I can simply activate the Capslock mode of the UHK to simulate the double Shift lock.
In the agent, I mapped an unused key in my Mod layer to activate Capslock.

NOW_I_CAN_TYPE_LIKE_THIS very comfortably...

mondalaci commented 4 years ago

@skaldesh So glad to hear! Is this a suitable replacement of the double Shift lock, and does it work on all OSes?

skaldesh commented 4 years ago

It should work on all OSes, though, I can confirm it only for Linux right now.
For me, I can live with it. Still, I would not be too keen on labeling it as a Neo2 Preset :)

mondalaci commented 4 years ago

@skaldesh Gotcha, thanks! If I understand correctly, only double shift lock is missing for a pristine Neo2 UHK experience, but it can be simulated reasonable well via Caps Lock. Please feel free to attach your updated Neo 2 keymap, and we'll include it eventually into Agent.

skaldesh commented 4 years ago

If I understand correctly, only double shift lock is missing for a pristine Neo2 UHK experience

For me, yes. But I am just a single person, others might say that they miss more keys/features from Neo2 (my Mod3 and Mod4 layer still lack a lot of keys of Neo2, since I am either not using them or sacrificed them to move the mouse).
Also, the thing about macros not being included in exported keymaps leads to the problem that the german Umlaute (ä, ö, ü) and the three dots "…" are missing in my keymap. Again, might be ok for some people but critical for others (I would consider myself as part of the latter).

Please feel free to attach your updated Neo 2 keymap

I will try one more time to polish some things, then upload it here.

skaldesh commented 4 years ago

@mondalaci I would export my keymap now again. Should I just export the whole device configuration via the Agent and upload it here?

mondalaci commented 4 years ago

@skaldesh Yes, that'd work. Just make sure not to upload sensitive macros.

skaldesh commented 4 years ago

UserConfiguration.json

Akku-21 commented 4 years ago

For me the german Umlaute work, if I map certain punctuations on the key. ü={[ ö=:; ä="' ß=_- and the macros from skaldesh dont work for me.

skaldesh commented 4 years ago

@Akku-21
You are probably using a gerrman keyboard layout on your OS, that is why you can map the punctuation characters to the Umlaute. My configuration is targeted to US keyboard layouts, as it is the most common I have to deal with on other machines (servers, embedded systems, etc.).
My macros are not exported in the last configuration and seem to have been dysfunctional in my first export attempt. If you want them, I can try to give them to you

poelzi commented 2 years ago

I got my uhk on friday and started on getting neo on the board. The keyboard is awesome, but the agent, especially in respect to mapping non us based layouts to uhk could definitely need some more work. I will give #617 a try, since the default layer configuration is definitly not enough. Even that the shift layer is linked to the base layer is problematic. The umlaut macros don't work for me. Could it be, that neo can only be mapped correctly if or a special keymap is used on the pc, since there are many none us based characters. Thinking about layer 5 and 6.

skaldesh commented 2 years ago

The umlaut macros don't work for me. Could it be, that neo can only be mapped correctly if or a special keymap is used on the pc, since there are many none us based characters. Thinking about layer 5 and 6.

I think UHK now supports arbitrary scancodes with #857. Have not tested it myself. Please report back, if you get it to work as expected :)

mondalaci commented 2 years ago

@poelzi #617 is not ready yet. Karel's UHK firmware fork enables advanced use cases you may be looking for. As for the umlauts, please read this article.