ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.78k stars 880 forks source link

No key repeat #454

Open badpx opened 5 years ago

badpx commented 5 years ago

I use smart keyboard with iPadOS beta5, it's can't be continuously input when long press any key.

tbodt commented 5 years ago

Works for me on beta 6.

bao3 commented 4 years ago

@tbodt I could confirm this issue . I’m using smart keyboard with iPad Pro , iPad OS version 13.5 , the latest iSH App .

from iPad OS 13.3 , I found iSH could not repeat any keys ,except spacebar .

bao3 commented 4 years ago

@tbodt I could confirm this issue . I’m using smart keyboard with iPad Pro , iPad OS version 13.5 , the latest iSH App .

from iPad OS 13.3 , I found iSH could not repeat any keys ,except spacebar .

UPDATE:

Numbers and Alpha bet never repeat , but symbol key and Arrow key could repeat correctly .

micdah commented 4 years ago

Could this be turned into a setting, so key-repeat could be turned on for all keys?

Use case examples could be vim where h,j,k,l are used for navigation for example.

tbodt commented 4 years ago

Looks like it broke at some point. It's supposed to always work, but it doesn't work for me now.

kuochang commented 3 years ago

Same problem here! Numbers and alphabet never repeat. As a vim users, it’s important to have h,j,k,l repeated for navigation.

SamHep0803 commented 3 years ago

Can also confirm, mostly everything other then the alphanumeric keys will repeat.

francoisvignon commented 3 years ago

as a vim user too, virtual arrow keys are repeated :-)

send from my mobile.


François

Le 5 déc. 2020 à 04:34, kuochang notifications@github.com a écrit :

 Same problem here! Numbers and alphabet never repeat. As a vim users, it’s important to have h,j,k,l repeated for navigation.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tbodt commented 3 years ago

This broke in iOS 13.4, not-coincidentally the same version UIKey was introduced. The best fix I know of is to use NSTimer to repeat the handling of raw keypresses.

riverful commented 3 years ago

This broke in iOS 13.4, not-coincidentally the same version UIKey was introduced. The best fix I know of is to use NSTimer to repeat the handling of raw keypresses.

iSH team has any plan for fixing it? I have same problem with Apple Magic Keyboard, and it would be perfect for me as terminal program except for this.

biao-biao commented 3 years ago

Still no key repeat in IOS 14.5.1

emkey1 commented 3 years ago

This is most likely Apples fault. Apparently in newer versions of their OS's holding down a key will popup a sub window. If you look in the lower left hand corner of the attached screenshot you will see what I mean.

Screen Shot 2021-05-17 at 9 52 34 AM

This is iSH running on my M1 MacBook Air.

This window does not popup when iSH runs in iOS, but I suspect this is the issue.

Changing the behavior of holding down a key is sub optimal, but Apple does what Apple does.

I'm not sure if there is a workaround. I'll post an update here if figure something out.

tbodt commented 3 years ago

There is a workaround, which is to implement key repeat manually by manually handling keypresses. I haven't had the time to implement this yet, would appreciate PRs. A slight difficulty is the necessary APIs were added in 13.4, and are independent from the other APIs being used. So this means basically having two complete independent implementations of keypress handling for pre-13.4 and post-13.4.

emkey1 commented 3 years ago

Supposedly the following will disable Apple's "functionality" on MacOS.

defaults write -g ApplePressAndHoldEnabled -bool false

I don't know if there is an equivalent in iOS. It would be nice if there were.

WillDelish commented 2 years ago

Would love to have this app support letter key repeats as a VIM user :)

matteha commented 2 years ago

Seconding this (seems to be a software issue as the Vim app in the App Store does work with letter repeating).

Prurite commented 10 months ago

Still no key repeat as of now, iSh 1.3.2 (Build 494) on iPadOS 17.1.1. Holding letter keys like h or k pops up a sub window in iSh, while working correctly in iVim.

A stackoverflow post https://apple.stackexchange.com/questions/92101/how-do-i-enable-key-repeat-on-ios says:

I concur with the others: by default, the iOS settings only allows auto-repeat for non-alphanumeric characters (everything, except letters and numbers). But you can make it work with alphanumeric characters using wantsPriorityOverSystemBehavior. What I did was:

for key in 0x061...0x079 { // all 26 lowercase roman letters
let K = Unicode.Scalar(key)!
let key = UIKeyCommand(input: "\(K)", modifierFlags: [],  action: #selector(insertKey))
key.wantsPriorityOverSystemBehavior = true
basicKeyCommands.append(key)
let keyS = UIKeyCommand(input: "\(K)", modifierFlags: .shift,  action: #selector(insertKey))
keyS.wantsPriorityOverSystemBehavior = true
basicKeyCommands.append(keyS)
}
GopherJ commented 6 months ago

without fixing this, xiaomi pad + termux will be much much better than ipad + ish

abastola0 commented 2 months ago

Still no key repeat as of now, iSh 1.3.2 (Build 494) on iPadOS 17.1.1. Holding letter keys like h or k pops up a sub window in iSh, while working correctly in iVim.

A stackoverflow post https://apple.stackexchange.com/questions/92101/how-do-i-enable-key-repeat-on-ios says:

I concur with the others: by default, the iOS settings only allows auto-repeat for non-alphanumeric characters (everything, except letters and numbers). But you can make it work with alphanumeric characters using wantsPriorityOverSystemBehavior. What I did was:

for key in 0x061...0x079 { // all 26 lowercase roman letters
    let K = Unicode.Scalar(key)!
    let key = UIKeyCommand(input: "\(K)", modifierFlags: [],  action: #selector(insertKey))
    key.wantsPriorityOverSystemBehavior = true
    basicKeyCommands.append(key)
    let keyS = UIKeyCommand(input: "\(K)", modifierFlags: .shift,  action: #selector(insertKey))
    keyS.wantsPriorityOverSystemBehavior = true
    basicKeyCommands.append(keyS)
}

Anyone working on this? Just wanted to confirm if this works.

zwing99 commented 2 months ago

+1 for priority on a setting for this..... please.

jelleh commented 3 days ago

Same problem, i can’t use hjkl in vim to navigate for now. This works well in Terminus. Really want to use iSH but with no key repeat i am forced to go back to terminus and ssh to a remote machine to use vim on the ipad.