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

Better keyboard input passthrough on mobile #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions webdata/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<button class="bottom right" onclick="app.showTextInput()">⌨</button>
</div>

<div id="text-input" class="scene">
<textarea class="grow" cols=1 rows=1></textarea>
<div class="buttons">
<div id="text-input" class="scene touch-input mouse-input keyboard-input">
<textarea placeholder="Touch to type" cols=1 rows=1></textarea>
<div class="flex-between">
<button onclick="app.showKeys('text-input', 1)">≡</button>
<button class="grow" id="send-text"></button>
<button id="send-text"></button>
</div>
</div>

Expand Down
39 changes: 13 additions & 26 deletions webdata/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,15 @@ textarea {
border: none;
resize: none;
font-size: 2rem;
background-color: white;
background-color: #303030;
color: black;
margin: 0;
padding: 0 0.5rem;
width: 100%;
}

textarea:focus {
outline: none;
}

#keys {
Expand All @@ -175,35 +180,17 @@ textarea {

#text-input {
align-items: stretch;
justify-content: end;
padding: 0;
gap: 0;
}

#text-input .buttons > button {
#text-input button {
border-bottom: none;
border-right: none;
}

#text-input .buttons > button:first-child {
border-left: none;
border-top: none;
}

@media (min-aspect-ratio: 4/3) {
#text-input {
flex-direction: row;
}

#text-input .buttons {
flex-direction: column;
}

#text-input .buttons > button,
#text-input .buttons > button:first-child {
border-top: 1px solid black;
border-left: 1px solid black;
}

#text-input .buttons > button:first-child {
border-top: none;
}
}
.flex-between {
display: flex;
justify-content: space-between;
}