Julow / Unexpected-Keyboard

A lightweight virtual keyboard for developers.
GNU General Public License v3.0
1.54k stars 194 forks source link

Edit placement of special character modifiers. #778

Closed photoalex closed 1 day ago

photoalex commented 1 month ago

First of all awesome keyboard! I've used it for quite a while and now I wanted to add a character modifier, but that made my other modifiers (select all, cut paste etc) move around where they are not familiar. Quite annoying, can I move them somehow?

Spike-from-NH commented 1 month ago

If you made your change by writing a custom layout, then you can certainly put other modifiers wherever you want them with—

Or other compass point or even key0.

photoalex commented 2 days ago

Hmm.. I didn't try that but wouldn't you agree that having a standard fixed place for special swipe characters would be good? I don't mind much where they are as long as they stay in the same place... i'm learning portuguese atm and add new character modofiers as i go. And it's unbelievably annoying when 'select all' 'copy/paste' jumps around everywhere... the only place i find swipe characters work less good is in the far right/left side, where you swipe out of the screen..

Spike-from-NH commented 2 days ago

In general, select all et al. do occupy a fixed position. However, if you add stuff to your keyboard, then they may move elsewhere; I haven't looked at the algorithm. Again, a fine solution is to write custom layout XML to put them exactly where you want them.

Incidentally, another reason to take control is to minimize unintentional swipes. With stock QWERTY, once a week or so, tapping Z was interpreted as a southeast swipe and selected the entire edit window, which was replaced by the next letter I typed (in an editor that doesn't implement undo)! Making it a west swipe solved the problem. Still a problem: Once a month or so, my cut or copy does not register as a swipe and a large region is replaced by x or c.

photoalex commented 2 days ago

Yeah I played around with it today.. it took a while cause im allways abit intimidated by editing various config files.. especially on android where it's not ever clear where they are located or if you even have permission to access (it's for your safety you know?) In any case I found the web gui editor and made something I like... btw, why isn't the gui editor in the app itself? I also noticed that the custom layout doesn't overide the app button setting which might be one reason why there isn't a fixed default? Also what is the name of the "ç, é, â, ã" charmodifiers?

Julow commented 1 day ago

It's definitely possible to assign a position to some keys (eg. select_all on the a key ?). Could you come up with suggestions on where to place them ?

I also noticed that the custom layout doesn't overide the app button setting which might be one reason why there isn't a fixed default?

Do you mean the bottom row of keys ?

Also what is the name of the "ç, é, â, ã" charmodifiers?

In the same order, they are: accent_cedille, accent_aigu, accent_circonflexe, accent_tilde. The names are not easy to discover, it would be great if the web editor could help with that.

Spike-from-NH commented 1 day ago

They are the one case where string constants use French instead of English.

@photoalex, they are listed in https://github.com/Julow/Unexpected-Keyboard/blob/master/doc/Possible-key-values.md — section Other modifiers and diacritics.

@Julow, Alex's problem is not that the default positions are wrong, but that, if the user commandeers one of the desired positions, the built-in key and others move to an unpublished second choice.

photoalex commented 1 day ago

I think we can mark this as solved as I've made a layout I'm reasonably happy with! Thanks again for this project. The reason I first started using it is because of a byproduct of the swiping actions. I'm not making even a fraction of typos as with other keyboards, awesome! And then i start to discover swiping actions, damn! an already good keyboard just keeps ketting better and better!

and if anyone's interested: I'd paste my layout but it doesn't show ...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Julow commented 1 day ago

Thanks :) I'll close as this is resolved.

Yes, please share your layout!

photoalex commented 8 hours ago

Thanks :) I'll close as this is resolved.

Yes, please share your layout!

Yeah, but how? It's in there but its invisible..

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keyboard name="QWERTY (Swedish custom)" script="latin">
  <row>
    <key key0="q" key2="1" key4="loc esc"/>
    <key key0="w" key2="2" key3="`" key4="\@"/>
    <key key0="e" key2="3" key3="€" key4="\#"/>
    <key key0="r" key2="4" key4="$"/>
    <key key0="t" key2="5" key3="&amp;" key4="|"/>
    <key key0="y" key2="6" key3="^" key4="%"/>
    <key key0="u" key2="7" key3="~" key4="\\"/>
    <key key0="i" key2="8" key3="*" key4="/"/>
    <key key0="o" key2="9" key3="+" key4="-"/>
    <key key0="p" key2="0" key3="="/>
    <key key0="å" key1="\?" key3="!"/>
  </row>
  <row>
    <key key0="a" key2="loc tab"/>
    <key key0="s"/>
    <key key0="d" key2="copy"/>
    <key key0="f" key2="selectAll"/>
    <key key0="g" key2="cut"/>
    <key key0="h" key2="paste"/>
    <key key0="j" key1="{" key2="pasteAsPlainText" key4="}"/>
    <key key0="k" key1="[" key4="]"/>
    <key key0="l" key1="(" key2="superscript" key3="subscript" key4=")"/>
    <key key0="ö" key1="&lt;" key4=">"/>
    <key key0="ä" key1="'" key3="&quot;"/>
  </row>
  <row>
    <key width="1.5" key0="shift" key2="loc capslock"/>
    <key key0="z" key2="undo"/>
    <key key0="x" key2="redo"/>
    <key key0="c" key2="accent_cedille" key3="accent_tilde"/>
    <key key0="v" key1="home" key2="accent_aigu" key3="accent_grave" key4="end"/>
    <key key0="b" key2=";" key3="accent_circonflexe" key4=","/>
    <key key0="n" key2=":" key4="."/>
    <key key0="m" key2="-" key4="_"/>
    <key width="1.0" key0="." key1="!" key2="\?" key3="'" key4=","/>
    <key width="1.5" key0="backspace" key2="delete"/>
  </row>
</keyboard>
Julow commented 4 hours ago

The trick is to enclose it in a code block:

```
code here
```

I've edited your comment. Thanks!