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

Discuss a modifier centered layout

Open doak opened this issue 1 year ago • 9 comments
trafficstars

I want to share a slightly modified keyboard layout and discuss it in case there is any interest.

There are mainly these adaptions:

  • Ctrl, Alt and Shift on both sides to be able to use the one which is better suited
  • I don't really had the need of the dedicated cursor key, hence combinded it with the spacebar.
  • I reverted the swipe to send "real" cursor keys because I had issues with modifiers.
  • Shifting third row. I always hit x instead of c, thats the try to avoid this.
  • Due the above I had room for another key. I made it a dot including important punctation since I had no better idea.

Screenshot_20240222-003837_1

<?xml version="1.0" encoding="utf-8"?>
<keyboard name="doak2" bottom_row="false" script="latin">
  <row>
    <key key0="q" key2="1" key4="esc"/>
    <key key0="w" key1="~" key2="2" key3="\@"/>
    <key key0="e" key1="!" key2="3" key3="\#" key4="loc €"/>
    <key key0="r" key2="4" key3="$" key1="loc ₪"/>
    <key key0="t" key2="5" key3="%"/>
    <key key0="y" key2="6" key3="^"/>
    <key key0="u" key2="7" key3="&amp;"/>
    <key key0="i" key2="8" key3="*"/>
    <key key0="o" key1="loc accent_macron" key2="9" key3="(" key4=")"/>
    <key key0="p" key2="0" key3="f11_placeholder" key4="f12_placeholder"/>
  </row>
  <row>
    <key shift="0.5" key0="a" key1="tab" key2="`"/>
    <key key0="s" key1="loc accent_ring" key2="loc §" key3="loc ß" key4="loc accent_ogonek"/>
    <key key0="d" key1="loc accent_grave" key2="loc £" key3="loc accent_aigu"/>
    <key key0="f" key1="loc accent_dot_above"/>
    <key key0="g" key1="loc accent_caron" key2="-" key3="_"/>
    <key key0="h" key2="=" key3="+"/>
    <key key0="j" key1="loc accent_trema" key2="loc accent_circonflexe" key4="}" key3="{"/>
    <key key0="k" key1="loc accent_double_aigu" key3="[" key4="]"/>
    <key key0="l" key2="|" key3="\\"/>
  </row>
  <row>
    <key key0="shift" key2="loc capslock"/>
    <key key0="z"/>
    <key key0="x" key2="loc †"/>
    <key key0="c" key1="loc accent_cedille"/>
    <key key0="v" key3="&lt;" key4="&gt;"/>
    <key key0="b" key2="\?" key3="/"/>
    <key key0="n" key1="loc accent_tilde"/>
    <key key0="m" key1="'" key2="&quot;" key3="'"/>
    <key key0="." key1=":" key3="," key4=";"/>
    <key key0="backspace" key1="shift" key2="delete" key3="subscript" key4="superscript"/>
  </row>
  <row height="0.95">
    <key width="1.7" key0="ctrl" key1="loc switch_greekmath" key2="loc meta" key4="switch_numeric"/>
    <key width="1.1" key0="fn" key1="alt" key2="change_method" key3="switch_emoji" key4="config"/>
    <key width="4.4" key0="space" key2="switch_forward" key1="switch_backward" key5="left" key6="right" key7="up" key8="down" slider="true"/>
    <key width="1.1" key0="alt" key1="ctrl" key3="compose"/>
    <!-- key width="1.1" key7="up" key6="right" key5="left" key8="down" key1="loc home" key2="loc page_up" key3="loc end" key4="loc page_down"/ -->
    <key width="1.7" key0="enter" key1="loc voice_typing" key2="action"/>
  </row>
</keyboard>

doak avatar Feb 21 '24 23:02 doak

A typewriter or hard keyboard has Shift on both sides because touch-typists are taught to hold it down with the hand that is not the one typing the capital letter. But here, duplicate modifiers are a waste because ➊ We're not touch-typing and ➋ We don't have to hold the key down.

Spike-from-NH avatar Feb 22 '24 00:02 Spike-from-NH

Duplicated modifiers are not a waste because they are handy when you only have one hand available to type, I even have a third location for some. It's all about ergonomics, and there is no one size fits all. It varies not only by person, but also by situation, moment or specific task.

sdrapha avatar Feb 22 '24 00:02 sdrapha

I also have my custom layout that I've been using and improving since beginning of 2022. If @Julow takes it, I would make it part of the official keyboard and I will for sure keep maintaining it. I only need a "go for it" that I would make a PR right away. Here it is: ( sorry, my intention is not to hijack the thread but it think it's related) Screenshot_20240221_193033_Brave

<?xml version="1.0" encoding="utf-8"?>
<keyboard name="QWERTY (Custom_Rapha)" script="latin" bottom_row="false"> 

<row height="0.6"> 
<key width="2.5" key0="tab" key7="switch_numeric" /> 
<key width="1.7" key0="left" key5="home" /> 
<key width="1.4" key7="up" key8="down" /> 
<key width="1.7" key0="right" key6="end" /> 
<key width="1.2" key7="shift" key6="alt" key8="ctrl" key0="fn" /> 
<key width="1.5" key0="backspace" key7="delete" key8="delete" /> 
</row> 

<row height="0.6"> 
<key key0="1"/> 
<key key0="2" key4="selectAll"/> 
<key key0="3"/>
<key key0="4" key4="cut"/>
<key key0="5"/>
<key key0="6" key4="copy"/> 
<key key0="7"/> 
<key key0="8" key4="paste"/> 
<key key0="9"/> 
<key key0="0"/> 
</row>

<row height="0.9"> 
<key key0="q" key4="`" key2="~" /> 
<key key0="w" key3="!" key2="@"/>
<key key0="e" key2="#" key3="loc €"/>
<key key0="r" key2="$" key3="loc £"/>
<key key0="t" key2="%" /> 
<key key0="y" key2="^"/> 
<key key0="u" key2="&amp;"/>
<key key0="i" key2="*"/> 
<key key0="o" key1="-" key3="_" key4="=" key2="+"/>
<key key0="p" key3="\" key1="|"/>
</row> 

<row height="0.9"> 
<key shift="0.5" key0="a" key2="loc accent_tilde" key4="tab" /> 
<key key0="s" key1="loc accent_ring" key2="esc" key3="loc ß" key4="loc accent_ogonek"/> 
<key key0="d" key1="loc accent_grave" key2="f11_placeholder"/> 
<key key0="f" key1="loc accent_dot_above" key2="f12_placeholder"/> 
<key key0="g" key1="loc accent_caron" key3="(" key4=")"/> 
<key key0="h" key1="loc accent_circonflexe" key4="}" key3="{"/> 
<key key0="j" key1="loc accent_trema" key2="loc accent_double_aigu" key3="[" key4="]"/> 
<key key0="k" key1="loc accent_macron" key2="loc accent_aigu" key3=";" key4=":"/> 
<key key0="l" key1="&quot;" key3="'"/> 
</row> 

<row height="0.9"> 
<key width="1.5" key0="shift" key2="capslock"/> 
<key key0="z"/> 
<key key0="x"/> 
<key key0="c" key2="ª" key3="ç" key4="loc accent_cedille"/> 
<key key0="v" key2="º"/> 
<key key0="b" key2="&lt;" key3=","/> 
<key key0="n" key2="&gt;" key3="."/> 
<key key0="m" key2="?" key3="/" /> 
<key width="1.5" key0="backspace" key2="delete" key4="delete"/> </row> 

<row height="0.8"> 
<key width="1.5" key0="ctrl" key2="meta" key4="alt"/> 
<key width="1.2" key0="fn" key1="switch_forward" key2="change_method" key3="switch_emoji" key4="config"/> 
<key width="4.6" key0="space" key5="left" key6="right" key7="switch_numeric" key8="switch_backward" slider= "true"/> 
<key width="1.2" key0="loc compose" key7="shift" key5="alt" key8="ctrl" key6="fn"/> 
<key width="1.5" key0="enter" key2="action"/> 
</row> 

</keyboard> 

I also reverted the swipe to send "real" arrow keys because that works better for me. The top row provides excelent precision in navigating the cursor, both in simple typing and while coding which I do frequently, and one handed.

sdrapha avatar Feb 22 '24 00:02 sdrapha

Quibbles: ➊ Put accent_grave and _aigu on the same key; swipe in the direction of the accent. ➋ Keyboard seems too tall for me.

Layouts are about personal tastes. Mine is nearby but I don't claim it's right for you nor want it added to the very long list. Rather than add these to our long lists, have a button to browse a gallery of user contributions as a way to get ideas.

Spike-from-NH avatar Feb 22 '24 11:02 Spike-from-NH

Nice to see experimentations being made :)

Do you need the Alt key often ? If not, I'd suggest moving it in a corner and putting the . on the bottom row. This could help remove a key from the third row, making the shift key bigger.

Just like the bottom row is separate from the layouts (unless specified), I wonder if the shift and backspace keys could be separate too ? We could imagine the keyboard tries to locate and modify these keys according to options like "swap shift and backspace" or "add key to backspace key". Does that inspire anyone ?

Also, the directional pad key on the bottom row might not be useful to everyone in its current form as it's crawded with invisible by default keys. Someone might want to keep only up, down, compose and choose something custom in the middle.

As your screen seems quite wide, you could try claiming the empty space on the second row by making the key a bit smaller:

shot

I agree with @sdrapha that duplicated modifiers are useful for one hand typing.

I reverted the swipe to send "real" cursor keys because I had issues with modifiers.

Can you open an issue for that ?

I only need a "go for it" that I would make a PR right away.

The app is not currently ready to accept such custom layouts. The maintenance overhead is a concern but the blocker is the usability of the layout option. I plan to implement https://github.com/Julow/Unexpected-Keyboard/issues/325 this year and allow more layouts after that.

For now, you can share your layout on https://github.com/Julow/Unexpected-Keyboard-layouts as I sometimes look into them to check for the usage of XML attributes. It might serve as a in-app galery some day.

I also reverted the swipe to send "real" arrow keys because that works better for me.

What are the problems you encountered with the slider ?

Julow avatar Feb 22 '24 17:02 Julow

Fun fact: While experimenting with layouts, I got locked in a layout that couldn't access the settings so I implemented b8e673b. If someone has time to add a button to the settings from the launcher application, that would help too.

Julow avatar Feb 22 '24 18:02 Julow

We don't have to hold the key down.

I usually write with two thumbs and actually do this most of the times, @Spike-from-NH. ;)

doak avatar Feb 27 '24 06:02 doak

Do you need the Alt key often ?

When using Termux quite a much. It's also required by my tmux configuration. But for sure that's quite a dedicated use case of mine. ;)

I agree with @sdrapha that duplicated modifiers are useful for one hand typing.

That's funny. I prefer for both, one handed and dual handed. Ctrl+A ist not feasable with holding Ctrl if it is located only on the left side. In other words: If single handed, I prefer the modifier on the same side. If dual handed, I prefer the modifier on the other side. This is especially useful for Shift imho. For letters rather in the middle, I am finding optimising myself for the following letter as well. ;)

I also reverted the swipe to send "real" arrow keys because that works better for me. What are the problems you encountered with the slider ?

Thanks for asking. Although I found the issue where I mentioned it (iirc there was an issue with multiple modifers at one), I can't reproduce it with the current version (I am using). Hence it may be perfectly working in the meantime.

doak avatar Feb 27 '24 07:02 doak

For now, you can share your layout on https://github.com/Julow/Unexpected-Keyboard-layouts as I sometimes look into them to check for the usage of XML attributes.

Thanks for this pointer. I will clean mine up and upload it there. @sdrapha, would be great to have yours shared as well.

doak avatar Feb 27 '24 08:02 doak