Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arrow keys #767

Open
danieltybr opened this issue Sep 25, 2024 · 6 comments
Open

Add arrow keys #767

danieltybr opened this issue Sep 25, 2024 · 6 comments

Comments

@danieltybr
Copy link

Hi, i want to customize my keyboard adding arrow keys, how can i do this?

@Spike-from-NH
Copy link
Contributor

Please read https://github.com/Julow/Unexpected-Keyboard/blob/master/doc/Custom-layouts.md for instructions on writing your own custom layout.

@danieltybr
Copy link
Author

Thanks!

@lokeshlkr
Copy link

Try my keyboard and make changes as you need, or simply use it as inspiration.

`





<fn a="cursor_left"  b="cursor_left"  />
<fn a="cursor_right" b="cursor_right" />
<shift a="left"  b="left"  />
<shift a="right" b="right" />
`

@Spike-from-NH
Copy link
Contributor

Well, what @lokeshlkr has provided is not a complete custom layout but text from a modmap in a custom layout.

In my custom layout, I have left and right arrows as separate keys, which can be swiped to get Home and End:

   <key key0="left" nw="home"/>
   <key key0="right" ne="end"/>

Note also that, by holding down the space bar then dragging to the left or right, you can generate a precise number of left and right codes.

@lokeshlkr
Copy link

lokeshlkr commented Oct 29, 2024

My bad... seems there was come copy error 🤔
here's the complete keyboard...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <keyboard bottom_row="false" width="10" name="AstroFish-k10" script="latin">
  <modmap>
    <fn a="left"  b="home"  />
    <fn a="right" b="end" />
    <fn a="up"  b="page_up"  />
    <fn a="down" b="page_down" />

    <fn a="cursor_left"  b="cursor_left"  />
    <fn a="cursor_right" b="cursor_right" />
    <shift a="left"  b="left"  />
    <shift a="right" b="right" />
  </modmap>
  <row>
    <key key0="1" ne="!" nw="`" sw="~"/>
    <key key0="2" key2="\@"/>
    <key key0="3" key2="\#"/>
    <key key0="4" key2="$"/>
    <key key0="5" key2="%"/>
    <key key0="6" key2="^"/>
    <key key0="7" key2="&amp;"/>
    <key key0="8" key2="*"/>
    <key key0="9" key7="-" key8="_"/>
    <key key0="0" s="=" n="+"/>
  </row>
  <row>
    <key key0="q" ne="tab" nw="esc"/>
    <key key0="w"/>
    <key key0="e"/>
    <key key0="r"/>
    <key key0="t"/>
    <key key0="y" key2="redo"/>
    <key key0="u" nw="(" ne=")"/>
    <key key0="i" nw="[" ne="]"/>
    <key key0="o" nw="{" ne="}"/>
    <key key0="p"/>
  </row>
  <row>
    <key key0="a" key2="selectAll"/>
    <key key0="s"/>
    <key key0="d"/>
    <key key0="f"/>
    <key key0="g"/>
    <key key0="h"/>
    <key key0="j" nw="&lt;" ne="&gt;"/>
    <key key0="k" ne="'"/>
    <key key0="l" sw="|" ne="&quot;"/>
    <key key0="backspace"/>
  </row>
  <row>
    <key width="1" key0="shift"/>
    <key key0="z" ne="undo"/>
    <key key0="x" ne="cut"/>
    <key key0="c" ne="copy"/>
    <key key0="v" ne="paste"/>
    <key key0="b"/>
    <key key0="n" ne="/" sw="\\"/>
    <key key0="m" s="..." n="." ne="?" nw=":" sw=";"/>
  <!--UP--><key key0="up"/> 
    <key width="1" key0="\n" n="action" s="enter"/>
  </row>
  <row>
    <key width="1" key0="fn" n="switch_numeric" s="switch_clipboard"/>
    <key width="1" key0="ctrl" s="change_method" n="switch_emoji"/>
    <key key0=","/>
    <key key0="alt" se="config"/>
    <key slider="true" width="3" key0="space" w="cursor_left" e="cursor_right" n="switch_forward" s="switch_backward"/>
  <!--LEFT--><key width="1" key0="left" />
  <!--DOWN--><key width="1" key0="down" />
  <!--RIGHT--><key width="1" key0="right"/>
  </row>
</keyboard>

@danieltybr
Copy link
Author

danieltybr commented Oct 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants