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

CAPS as Ctrl "bug" #4

Closed
rekendahl opened this Issue Mar 31, 2016 · 11 comments

Comments

Projects
None yet
3 participants
@rekendahl

rekendahl commented Mar 31, 2016

CAPS as CTRL is a beautiful feature. Thank you!

It also "works" in that it sends CTRL to the mosh terminal. The issue is that the keyboard also switches to ALL CAPS when typing. The iOS settings General->Keyboard->Enable Caps Lock switch seem to have no effect.

It's possible that this is built into the keyboard at a lower level? If so blink would have to keep track of state and keep translating CAPS to caps on the fly.

If this issue cannot be resolved I suggest removing mapping the CAPS LOCK key.

@carloscabanero

This comment has been minimized.

Contributor

carloscabanero commented Apr 2, 2016

I have been investigating and there is no way to actually disable the CAPSLOCK function. We could keep track of the state but it won't really work (i.e. the user could change the state outside the app and we would never know).

We will ship the feature, but will be disabled and customisable by the user. So whenever Apple allows this, we will have it already.

@carloscabanero carloscabanero added the chore label Apr 2, 2016

@cirqueit

This comment has been minimized.

cirqueit commented Apr 3, 2016

This feature, along with mosh is exactly what I want in a shell (I had thought I'd need to write my own app).

Please keep the option to track state and send the right key inside the app.

If you can send a CAPSLOCk keypress when the app loses focus if it's toggled, that would be amazing.

@carloscabanero

This comment has been minimized.

Contributor

carloscabanero commented Apr 3, 2016

I've been thinking about this and tracking state within the app would actually be quite simple. So simple, that I don't think anything has to be tracked. I'm gonna try to have it ready in the next two versions so we have enough time to test that it works correctly.

I agree that restoring the CAPSLOCK state outside the app would be great. Unfortunately, I've been investigating and I don't know any way to send a CAPSLOCK keypress programmatically in iOS :(

Great news is that at least, and still have to test it, but we might be able to release with CAPS as Ctrl working :)

@cirqueit

This comment has been minimized.

cirqueit commented Apr 3, 2016

That would be great. I'd love to test it and give feedback (waiting for alpha invite - @cirqueis on Twitter).

I'd be fine with either a 'A' or 'a' displayed in the corner to let me know the current state. Would also be good for debugging.

@rekendahl

This comment has been minimized.

rekendahl commented Apr 3, 2016

And here I was almost giving up on the feature but both your comments helped me and it shouldn't be to bad to implement.

With option CAPS LOCK as CTRL simply NEVER send capital letter to the screen in the app (unless I hold down shift). It would be great if you could set the CAPSLOCK state when leaving the app but I can live with the hassle of "unknown" caps lock state when I switch out.

Perhaps a small indicator of caps lock state would be helpful but it needs to be unintrusive.

Yay for it coming back. I think a lot of programers will appreciate this!

@cirqueit

This comment has been minimized.

cirqueit commented Apr 3, 2016

That's what I was planning on doing if I were to roll my own. Lowercase and then (re)capitalize based on the SHIFT key.

Perhaps a visual bell on exit / swap if CAPSLOCK is ON? Prompt's violet-bell-on-black-terminal is aesthetically pleasing.

@cirqueit

This comment has been minimized.

cirqueit commented Apr 3, 2016

I was looking into doing something like this to handle the final CAPSLOCK state.

http://blog.lazerwalker.com/objective-c/code/2013/10/17/more-fun-with-simulated-ios-events-keypresses.html

@carloscabanero

This comment has been minimized.

Contributor

carloscabanero commented Apr 3, 2016

This would work but the problem is that the app would get rejected from the App Store :(

I think it doesn't make any sense in the API to have the ability to capture caps lock as a modifier but not allowing people to just turn it off, or "not propagate it". At some point they will fix it, but until then I think we can do with just ignoring casing. In the end we control what gets displayed so it should be easy.

Another thing to indicate caps lock when switching apps would be to add something in the app screenshot. But don't know if worth the hassle.

@cirqueit

This comment has been minimized.

cirqueit commented Apr 3, 2016

I'm fine with CAPS possibly being toggled when I leave if that's what gets me the remapping :)

BTW do you think it would be possible to separate the CAPS to CTRL feature and incapsulate it as a custom keyboard? Forced, per-character auto-correct? Remapping could then work system wide. Lots of potential users there too.

@carloscabanero carloscabanero self-assigned this Apr 4, 2016

@rekendahl

This comment has been minimized.

rekendahl commented Apr 5, 2016

Let's keep the feature simple and optional. Let's us who wants it deal with CAPS LOCK being in an unknown state when we leave app. You can always polish it later and while this is a VERY important feature to me I think implementation should be minimal (at first).

Having CAPS LOCK mappable would be a great feature and you already support the keyboard so well!

@carloscabanero

This comment has been minimized.

Contributor

carloscabanero commented Apr 7, 2016

Should be up fixed on next release. Excited about this one!

holzschu referenced this issue in holzschu/blink Feb 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment