Unexpected-Keyboard icon indicating copy to clipboard operation
Unexpected-Keyboard copied to clipboard

Bone keyboard layout

Open quantenzitrone opened this issue 3 years ago • 25 comments
trafficstars

closes #116

  • [x] math additions to handleFn
  • [x] normal bone layout pane
  • [x] math pane → almost finished, I just have to decide if I want some greek letters multiple times (like in the desktop bone layout) or if I want to add some more letters and which letters. Currently, I consider some of these: ϗϏ Ϙϙ Ϛϛ Ϝϝ Ϟϟ Ϡϡ Ϸϸ Ͱͱ, but not all will fit.
  • [x] slash diacritic for characters like this: øħ
  • [x] switch from normal pane and greek&math
  • [x] new special font characters for ◌⃗ and accent_slash (and other?)
  • [ ] finalize the layouts (especially the math layouts still need tweaking)

quantenzitrone avatar Jun 02 '22 21:06 quantenzitrone

◌⃗ is by the way not a dead key but just Unicode combining character (U+20D7) that goes on any character like this: ⃗ a⃗

quantenzitrone avatar Jun 02 '22 21:06 quantenzitrone

About uppercase characters, most of them should be handled by Java's toUpperCase function. If some are missing, you can add a switch case in handleShift (KeyModifier.java line 45).

Julow avatar Jun 04 '22 13:06 Julow

This is generally done using dead-keys on this keyboard. (dead keys in this app are a kind of interactive combining character)

As far as I know, all the other dead keys are diacritics, which result in a different Unicode character when typed. This ◌⃗ is containing 2 characters, so I could combine any character with it. ,⃗ +⃗ 0⃗ ϰ⃗ with the arrow always at the same position. That's why some character look weird with it, for example M⃗ °⃗ —⃗

quantenzitrone avatar Jun 04 '22 18:06 quantenzitrone

Half of these are the uppercase version of the other half. There's still a lot of room on the keyboard.

Yeah, that's intentional, but these are 8 different letters and I only have 3 keys left on the keyboard which have no character yet, so max. 6 characters fit (with fn as a character modifier). For example: I would use Ϛϛ (stigma) as a variation(fn) of Ϝϝ (diagramma) because acc. to Wikipedia they are related. The same with Ϟϟ (koppa) and Ϙϙ (archaic koppa).

quantenzitrone avatar Jun 04 '22 19:06 quantenzitrone

i decided to include the three greek numerals ϛ (Stigma) ϟ (Koppa) and ϡ (Sampi) + their archaic variants in fn ϝ ϙ and ͳ

quantenzitrone avatar Jun 06 '22 17:06 quantenzitrone

I merged the new changes into my branch and resolved the conflicts and learned a few things about how to use git in the process :)

quantenzitrone avatar Jun 06 '22 18:06 quantenzitrone

Well played for the merge :) Sorry, I won't have time to continue reviewing until next week.

Julow avatar Jun 06 '22 18:06 Julow

It works 😁 tho I have spotted some oddities already:

  • the "show all accents"-option is gone
  • f12-placeholder is also f11 or at least it has the text f11, but I don't know how to test this

on all layouts, not just bone

quantenzitrone avatar Jun 06 '22 18:06 quantenzitrone

Wait what show every accent setting is something that changed in 1.16.0 why? accents are wonderful

quantenzitrone avatar Jun 06 '22 20:06 quantenzitrone

"This option cannot be implemented easily now that the set of "accents" (localized keys) isn't defined." ah

quantenzitrone avatar Jun 06 '22 21:06 quantenzitrone

Wait what show every accent setting is something that changed in 1.16.0 why? accents are wonderful

This option was in the way of other improvements (see https://github.com/Julow/Unexpected-Keyboard/issues/164). Are you missing some dead-keys or characters ? If yes, what are your installed languages ?

Julow avatar Jun 19 '22 22:06 Julow

I have English and German installed and as expected I only have the diacritic for Umlaut (accent_trema). So I don't want have to install 6 or more (idk) languages to be able to type all diacritic-characters.

Would bringing back the "show all accents" option be possible like this?:

  private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype)
  {
    HashSet<KeyValue> extra_keys = new HashSet<KeyValue>();
    List<InputMethodSubtype> enabled_subtypes = getEnabledSubtypes(imm);
    switch (_config.accents)
    {
      // '3' was "all accents", now unused
      case 1:
        extra_keys_of_subtype(extra_keys, subtype);
        for (InputMethodSubtype s : enabled_subtypes)
          extra_keys_of_subtype(extra_keys, s);
        break;
      case 2:
        extra_keys_of_subtype(extra_keys, subtype);
        break;
      case 3: 
        extra_keys.add(KeyValue.getKeyByName("accent_aigu"));
        extra_keys.add(KeyValue.getKeyByName("accent_caron"));
        extra_keys.add(KeyValue.getKeyByName("accent_cedille"));
        extra_keys.add(KeyValue.getKeyByName("accent_circonflexe"));
        extra_keys.add(KeyValue.getKeyByName("accent_grave"));
        extra_keys.add(KeyValue.getKeyByName("accent_macron"));
        extra_keys.add(KeyValue.getKeyByName("accent_ring"));
        extra_keys.add(KeyValue.getKeyByName("accent_tilde"));
        extra_keys.add(KeyValue.getKeyByName("accent_trema"));
        extra_keys.add(KeyValue.getKeyByName("accent_ogonek"));
        extra_keys.add(KeyValue.getKeyByName("accent_dot_above"));
        extra_keys.add(KeyValue.getKeyByName("accent_double_aigu"));
        extra_keys.add(KeyValue.getKeyByName("accent_slash"));
        extra_keys.add(KeyValue.getKeyByName("accent_arrow_right"));
      break;
      case 4: break;
      default: throw new IllegalArgumentException();
    }
    _config.extra_keys = extra_keys;
    if (enabled_subtypes.size() > 1)
      _config.shouldOfferSwitchingToNextInputMethod = true;
  }

I made this in my local repo, but I wasn't able to build it because the android-sdk packages for my distro are pretty out-of-date. :( Should I push it to test it here?

quantenzitrone avatar Jun 20 '22 07:06 quantenzitrone

oh it works, I managed to build it with nix

but the dead keys are not placed in the right places

Screenshot_KISS_launcher_20220620-103937

quantenzitrone avatar Jun 20 '22 08:06 quantenzitrone

Would you be okay with 2 versions of Bone instead? One, similarly to the current implementation of Neo2, with a number row and one heavily customized to optimally fit into the theme of unexpected keyboard? Because I kinda realized that trying to do both at once doesn't work, but I kinda still want the actual Bone Layout to be implemented. I kinda feel like the customized version wouldn't really attract many users at first, because it wouldn't be actual Bone anymore But I also still think the customized version should exist because, if other Neo enthusiasts have ideas to improve it, it can be changed, and it could be a cool community project to bring Neo Layouts to mobile in an unjanky way.

quantenzitrone avatar Jul 07 '22 23:07 quantenzitrone

oh the current implementation of neo 2 doesnt have a number row but it has 11 keys in one row

quantenzitrone avatar Jul 07 '22 23:07 quantenzitrone

Screenshot_Scarlet_Notes_FD_20220708-030445

the current state

quantenzitrone avatar Jul 08 '22 01:07 quantenzitrone

I've merged the greekmath layout, the ẞ and the greek/math Fn combinations. Thanks a lot!

I've added the key for switching to the greekmath pane and placed it on the numeric pane and on Fn+switch_numeric for the other layouts. I did small changes to it:

  • Bigger buttons to move back to the other panes
  • Removed modifiers (Alt, Ctrl, Mod) that have no effect and some other keys

I've pushed a merge commit to your branch to remove things that are already merged. Of course, feel free to make more modification to the greekmath layout.

Julow avatar Jul 09 '22 15:07 Julow

Would you be okay with 2 versions of Bone instead?

Please add the layout that you would use but also one that works well with the app and the touch screen. You can't replicate exactly the same layout due to the constraints (no layers, swipe movements, hard-coded combinations). I'm not against another version in the future but only if it has users.

Julow avatar Jul 09 '22 16:07 Julow

So you made greekmath as a general layout? Other Neo Variants like Neo2 or NeoQuertz would need different math panes to reflect the placements of the keys in the main layout. α at the same position as a for example. I'd rather have it implemented similarly to the keyboard layout for programming, where you can have different variants. Right now, every layout has the math layout for bone…

quantenzitrone avatar Jul 09 '22 16:07 quantenzitrone

So you made greekmath as a general layout?

Yes. I think it's better that way, so there's only one layout to maintain and everyone can enjoy it. If it is really needed, different variants can be added later but I doubt it will be justified. The new greekmath will certainly evolve a lot as other users give feedback and as the app evolves, this is not possible if there's many variants.

Julow avatar Jul 09 '22 17:07 Julow

i created a new branch where i reimplemented the math pane like the programming layout and created a querty oriented math pane version

quantenzitrone avatar Jul 11 '22 09:07 quantenzitrone

Please check it out, when you have time, and give feedback. Would this implementation be ok for you too? Alternatively, I think we could also combine math and programming and make the shown text for the switch key dependent on the layout that is selected (for math layouts it would be Πλ∇¬ and for programming it would be Prog).

quantenzitrone avatar Jul 11 '22 09:07 quantenzitrone

I had a look at your branch (extra-math-pane) and it's very interesting, thanks, but I wouldn't accept a second math pane now.

The current math pane has 0 user and it isn't satisfying yet: too crowded, some symbols are missing. As I said above, I'm not against adding an option in general but only if it is justified. If it is important to you that the math pane is exactly the one from Bone, let's add the option if it ever change too much.

Feel free to tweak the greekmath pane in this PR.

Julow avatar Jul 15 '22 15:07 Julow

Ping me when you think the Bone layout is ready to be merged.

Julow avatar Jul 15 '22 15:07 Julow

i wanted to finish it in the train today but nix-shell shell.nix needed to download something and internet in german trains is apparantly too slow to download 200mb before the connection times out💀

quantenzitrone avatar Aug 11 '22 14:08 quantenzitrone

Hi! I would like to release soon :) What's missing to the Bone layout ? If you have some time, I'd like to have your opinion on the greek and math symbols too.

Julow avatar Sep 24 '22 11:09 Julow

Yeah, I kinda forgot about it...

I just pushed some minor fixes for the bone layout I already had locally.

Since i have been using this layout for a while now and I'm pretty happy with it, it is ready to be merged.

quantenzitrone avatar Sep 24 '22 11:09 quantenzitrone

About the math layout, it is alright. I haven't been using it as much as I thought I would, i also think that fn+123+ is a little to uneasily accessible. But it contains about every unicode character someone could want to write unicode-heavy formulas, so it does what it needs to do...

quantenzitrone avatar Sep 24 '22 11:09 quantenzitrone

I've added an option to add the switching key onto the main layout 2fc4051. I consider that Fn+123+ or the dedicated key on the numeric layout are enough so I might remove it in the future depending on feedback.

Julow avatar Sep 24 '22 14:09 Julow