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

Blink Shell/Safari side by side - Hardware keyboard does not focus #803

Closed
nothingto opened this issue Sep 26, 2019 · 59 comments
Closed

Blink Shell/Safari side by side - Hardware keyboard does not focus #803

nothingto opened this issue Sep 26, 2019 · 59 comments

Comments

@nothingto
Copy link

Steps to reproduce:

1.) Open Blink shell and safari. Put them both in split screen mode.

2.) Type something in blink shell. Tap on the safari window to “focus” to it. Start typing something in the address bar or something.

What happens:

Whatever I type on the safari window seems to still only register in Blink shell. It does not properly focus the keyboard to type only in the safari window.

What should happen:

Whatever I type while I am “focused” on the safari tab or any other app for that matter, should only register keystrokes and characters on that focused tab, not blink.

Is there any workaround for this? It seems as though I have to use both apps full screen and just swipe between them to make this usable. Would be more convenient if I was able to split screen them.

@yury
Copy link
Collaborator

yury commented Sep 26, 2019

Hi @nothingto

What version of the blink?

@pbnj
Copy link

pbnj commented Sep 26, 2019

I can replicate this in latest version on AppStore (12.10).

@nothingto
Copy link
Author

nothingto commented Sep 26, 2019

Hi @nothingto

What version of the blink?

I am on the latest version on the AppStore (12.10)

@nothingto
Copy link
Author

@yury Were you able to replicate this? I would say this makes the application completely unusable in a multi-tasking scenario which happens very often when using blink (documentation, etc). Would love to see this being taken as priority if possible.

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

Hi @nothingto, can you take a look on v13? I would love to add you to TF

@pbnj
Copy link

pbnj commented Sep 27, 2019

@yury - I know I joined TestFlight a while back, but I've stopped testing it since then. May I ask to be re-added to Blink TF? Email: petermbenjamin@gmail.com

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

@petermbenjamin sent!

@pbnj
Copy link

pbnj commented Sep 27, 2019

@yury - thank you. Unfortunately I cannot re-use 1 invite for more than 1 device 😬
Can you send me a 2nd invite?

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

@petermbenjamin can’t send second invite to same email.

You should just refresh TestFlight list on second device

@pbnj
Copy link

pbnj commented Sep 27, 2019

@yury - that worked! thank you again!

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

@nothingto sent!

@nothingto
Copy link
Author

nothingto commented Sep 27, 2019

@yury Unfortunately, after testing V13, the issue still persists. I’m using the Apple Smart Keyboard with a 2018 iPad Pro. I’ve followed the same reproduction steps and had the same issue. If you split screen safari and blink shell, try switching between each apps focus by pressing the split window of the app. When switching between them, Blink always takes in the inputs from my keyboard even when I clicked on safari and am trying to say type in an address on the address bar or etc.

@petermbenjamin Would you be able to confirm this as it seems that you also have TF V13 now.

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

@nothingto can you record quick video? on v13 I cant repro you case.

@nothingto
Copy link
Author

@yury

675FA56C-DC4E-48DD-89C9-9B23F9BCC979-min

So you can see even when I’m on the safari window, it’s typing to the blink shell.

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

interesting... what device do you have? I don’t have this issue on iPad 11”.....

very interesting..

@nothingto
Copy link
Author

nothingto commented Sep 27, 2019

@yury iPad Pro 12.9’’ (2018). Getting this with the Apple Smart Keyboard. You can see how this can make the app almost unusable in multi-tasking situations, and i’m glad others were able to reproduce this.

@pbnj
Copy link

pbnj commented Sep 27, 2019

I can reproduce @nothingto's issue as well.
1EECBF8D-445F-410E-ACFB-F321B884035A

Blink: v13.0.139. Sep 27 2019
Model: 2018 iPad Pro 12.9"
Hardware Keyboard: Apple Smart Keyboard

@yury
Copy link
Collaborator

yury commented Sep 27, 2019

hmm..... I will try repro that..... very interesting.

@nothingto
Copy link
Author

nothingto commented Sep 27, 2019

@yury For extra context, i’ve taken the apple smart keyboard off, and tried the same thing with just the software keyboard. It works as expected. It’s only when I put the hardware keyboard (apple smart keyboard), this issue arises. So we can pinpoint this to two things: could be generally the external hardware keyboards (any non-software keyboards), or apple smart keyboard specifically. I can’t see how the device size (your 11’’ vs our 12.9’’) might play a role at least for now.

@pbnj
Copy link

pbnj commented Sep 27, 2019

I tried with Apple Magic Keyboard (plugged into USB hub & wireless), but I was having some other issues that prevented the keyboard from working properly.

@nothingto - do you have other external keyboards you can try with your iPad?

@nothingto
Copy link
Author

nothingto commented Sep 27, 2019

@yury @petermbenjamin I’ve just tested this on the Apple Magic Keyboard (bluetooth), and it was the same issue. So we can probably expand this into a problem/bug relating to external hardware keyboards in general.

So far tested on:
1.) Apple Smart Keyboard
2.) Apple Magic Keyboard

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

I still can't reproduce on iPad Pro 11 and iPad pro 12.9" 2018 with smart keyboards.

How guys you do the split?

@pbnj
Copy link

pbnj commented Sep 28, 2019

I split them like this:

  1. Launch blink
  2. Swipe up to reveal dock
  3. Tap and hold Safari then drag to right side of screen

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

Can you send me screen shots of config->keyboard?

@pbnj
Copy link

pbnj commented Sep 28, 2019

Here are mine:
DD35317C-26C2-42CF-9D30-2AC06861F3CA
2C4D025B-5495-48E7-9274-77B13A909D9D

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

@nothingto, @petermbenjamin

I have sent you build 140. Please take a look. Is it better for you?

Just in case, I added cmd+o as focus out command.

@nothingto
Copy link
Author

nothingto commented Sep 28, 2019

@yury Build 140 still does not fix the issue, but cmd+o does work. Any way to force “cmd+o” behavior when you tap on another window? My only concern with cmd+o is that if I have vim keybinds or etc in the shell, it might cause conflicts (currently not a problem, I do see a ton more blink keybindings on the cmd button, so maybe its not an issue).

On an other note, out of curiosity, how do you open the windows? I’d like to be able to get you to the point of being able to reproduce this. So far, it seems like it it is on any external hardware keyboard under any multitasking where you have a blink shell open and any other app open on the screen at the same time on the screen.

One thing I noticed when pressing cmd+o:

When I press cmd+o, the cursor on the terminal stops blinking. However, when not pressing cmd+o, but tapping onto another app’s window, the cursor keeps blinking. So the blink shell still holds “keyboard input rights”. Whatever is being done on cmd+o, it seems to strip the shell from any keyboard input rights, allowing the app that receives the next tap to hold the “rights” to the keyboard input and focus, whether the next tap is on blink shell again, safari, or any other app.

Also, when I switch from the blink shell to a safari window and click on a text input box (like an address box or comment section), before I start typing, pressing cmd+o automatically puts focus into safari, so I don’t have to tap on the window itself again.

Would be nice to have the feature of cmd+o automatically on tap without having to press it, but it works with cmd+o, so progress, any ideas if that is possible? 😃

I am not too familiar with iOS SDK/framework, but there has to be a way to let you know when a user is not “focused” on your window in a multi-tasking situation, to which there has to be “triggers”. You’d trigger the cmd+o portion of the code on that trigger.

Edit: Sorry if this is a long block of text, thought I shouldn’t spam the thread with multiple posts. So, when switching from blink shell to another window, pressing and holding just the command key on safari still shows the keyboard shortcuts for blink shell, not safari. So this is something to do with the blink shell holding complete focus on an OS level, even though my touch inputs are still received on the other non-blink app. Just giving as much details as possible just in case it is helpful :)

@pbnj
Copy link

pbnj commented Sep 28, 2019

@yury - I just noticed something.

I tested the split screen focus/input issue on build 140 and it worked flawlessly for me.
As soon as I plugged my iPad to external display to test cmd+o (which still didn't work), the split screen focus/input issue returned.
After unplugging from external display, the split screen focus/input issue persists for me.

@pbnj
Copy link

pbnj commented Sep 28, 2019

@yury another observation regarding split screen input focus.

  1. Start with Blink in full screen, then open Safari in split screen
  2. Input focus will be on Safari. You can type in Safari
  3. Focus input on Blink and type in Blink.
  4. Focus input one more time on Safari and type in Safari.
  5. Focus input on Blink and type in Blink. At this point, you cannot focus input on Safari anymore.

Tested on Blink 13.0.140 and 13.0.141

@nothingto
Copy link
Author

nothingto commented Sep 28, 2019

@petermbenjamin I am able to replicate that. For some reason now, the first focus transfer into safari works great, but the subsequent focus transfers do not work.

So it seems the latest build fixed the initial portions of it, however, subsequent focus transfers do not work again. Cmd+o however, does work for me to transfer focus still (I am not using external displays). So, i am excited we’re making progress still! More progress compared to the beginning of the issue being opened, but I think there might be a slight bug on how we transfer focus on subsequent transfers.

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

Just to be sure. Notes + Safari works ok? or after few switches it brakes too?

@nothingto
Copy link
Author

@yury Notes + Safari works as expected. Each app is able to retrieve focus as intended when tapped or switched on.

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

Another thing to try. Turn on config->Smart Keys->Show with external keyboard.

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

And another thing to try - Blink + notes. Just in case. Since Blink uses WebKit internally...

@nothingto
Copy link
Author

nothingto commented Sep 28, 2019

@yury It’s currently turned on. Also tried Blink + Notes, and facing the same issue. The issue universal to any app when using Blink - focus is not transferring. Only thing that works is cmd+o and it transfers focus perfectly. But, it does not happen automatically as it should without the command.

@pbnj
Copy link

pbnj commented Sep 28, 2019

@yury

  • tried with Smart Keys -> Show with external keyboard, issue still occurs.
  • tried with Blink + Notes, input initially focused on Notes, then changed to Blink, couldn't change input focus back to Notes

@nothingto
Copy link
Author

nothingto commented Sep 28, 2019

Okay, so, @petermbenjamin @yury do you have “Shortcuts” disabled on your settings for your keyboard? I just turned it ON, and the focus shift happens automatically. However, when “Shortcuts” is disabled, it does not happen automatically. So I was able to now pinpoint it further. This is still not an issue with any other app, so this is a weird interaction with Blink and Shortcuts being disabled on external keyboards. I’d prefer NOT to have shortcuts enabled as it’s a huge bar on the screen and it’s quite buggy with screen refreshes/alignment on many apps.

Settings (OS) -> Keyboard -> Shortcuts

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

Oh man! Yes! it is shortcuts!. Now I can reproduce!!

@yury
Copy link
Collaborator

yury commented Sep 28, 2019

On the video, I see @petermbenjamin has them turned off too.

@pbnj
Copy link

pbnj commented Sep 28, 2019

Yes, I disable keyboard shortcut bar in system keyboard settings.

yury added a commit that referenced this issue Sep 30, 2019
@yury
Copy link
Collaborator

yury commented Sep 30, 2019

Pushed build 142 with a fix.
Please confirm it works for you too :)

@nothingto
Copy link
Author

nothingto commented Sep 30, 2019

@yury Works perfectly :) Thanks for the constant communication and speedy fix! Most useful app in the whole appstore for me!

@yury
Copy link
Collaborator

yury commented Oct 1, 2019

On build 145 and higher. You should ensure to set config-> Smart Keys -> Show with external keyboard to be On to work.

@spiritphyz
Copy link

spiritphyz commented Oct 1, 2019

Confirming that the fix works on my wired keyboard.

My configuration:

  • 12.9” iPad Pro (2018)
  • External wired keyboard connected by Apple’s “USB-C Digital AV Multiport Adapter”
  • ipadOS 13.1.1
  • Blink (Testflight Build 145)
  • Config > Smart Keys > Show with external keyboard is enabled

With Blink on the lefthand split view and Safari on the righthand split view, when I tap between each split view, the keyboard input is set correctly to the app that I just tapped on.

@grayfall
Copy link

grayfall commented Oct 16, 2019

@yury I think I've got a somewhat related related issue. Blink is
blinking (no pun intended) a lot in split-screen. I've made a screen recording capturing this rather annoying behaviour: https://1drv.ms/v/s!AlQ-UsUDf6TWg5IpiFgupQMHzFMAIA . I believe, this happens when the main app (Safari) grabs or releases the keyboard (i.e. when the bottom panel appears or disappears). I am running the latest TF build on iPadOS 13.1.2 (11" iPad Pro with Apple's smart keyboard folio). Just to be clear, I've already tried the aforementioned fix.

@yury
Copy link
Collaborator

yury commented Oct 16, 2019

@grayfall can't see the video, just blank page.

@grayfall
Copy link

grayfall commented Oct 16, 2019

@yury Sorry, something went wrong with access rights. Here is a new link https://1drv.ms/v/s!AlQ-UsUDf6TWg5Ipq_zhtgmceKYy7g

@grayfall
Copy link

@yury have you been able to watch the video via the new link?

@yury
Copy link
Collaborator

yury commented Oct 18, 2019

@grayfall yep, thanks.

@andrius
Copy link

andrius commented Oct 18, 2019

I have this issue randomly occurring when I switch out of blink to do something on ipad. Usually it is safari, but could be any application;

Then after I return to the Blink, I can't type anymore. What helps: I press the flag key and switch language two times (english to another and back). Also sometimes have to double-press the capslock (which in blink is mapped to the Esc).

ipad pro 11 with smart keyboard

@yury
Copy link
Collaborator

yury commented Oct 18, 2019

@andrius what version of blink do you use?

@andrius
Copy link

andrius commented Oct 18, 2019

recent from appstore: Blink: v12.10.109. Jul 18 2019

@yury
Copy link
Collaborator

yury commented Oct 18, 2019

Ton of changes to work properly on iOS 13.
Working hard on last things in Blink 13 with iOS 13 support. Hope to push next week.

@grayfall
Copy link

@yury Dear Yury. I've updated to the latest TF release. The 'blinking' issue persists: https://1drv.ms/v/s!AlQ-UsUDf6TWg5xYJKt03N2BZn99hA

@yury
Copy link
Collaborator

yury commented Oct 31, 2019

@grayfall size of terminal changes, that is why you got reflows. I think you have 3 options here.

  1. Turn on smart keys with hardware kb (config -> Smart Keys -> Show with external kb)
  2. Lock terminal size (3f tap and press ‘lock’) frame of terminal will be locked and will not change even on device rotation.
  3. Turn off shortcuts in the system (Settings.app -> General -> Keyboard -> Shortcuts)

yury added a commit that referenced this issue Jan 10, 2020
@Regenuluz
Copy link

This issue persists on my ipad. However, Blink doesn't steal focus until after it has had text focus the first time.

Setting up split view while Blink shows settings it is possible to exit settings and go to e.g. Safari and type there. However as soon as Blink gets focus on the command line it keeps it unless you open settings again.

iPad Pro 11"
Apple Smart keyboard (dk version)
Blink: v13.3.211

@yury
Copy link
Collaborator

yury commented Jan 31, 2020

I’m working on that. As temp workaround you can press cmd+o in blink to focus out.

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

8 participants