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

Ctrl-Shift-T not working #6

Closed
JanmanX opened this issue Mar 7, 2015 · 28 comments
Closed

Ctrl-Shift-T not working #6

JanmanX opened this issue Mar 7, 2015 · 28 comments
Assignees
Labels
not hid-apple-patched Issue is not related to the patched version but upstream one.

Comments

@JanmanX
Copy link
Contributor

JanmanX commented Mar 7, 2015

When swapping Left-Shift Left-Ctrl with FN, CTRL-SHIFT-T combination is not being registered.
Using the original patch supplied in this repository (hid-apple.c.original_(kernel_3.16.0-28), the combination works.

I first noticed it when trying to reopen last opened tab in Chrome, but verified in some other programs.
You might want to get some better readings using "xev".

Free5lot has a much better understanding of the module, but I figure it is a problem with the mechanical part of the keyboard, and not the patch itself, and thus, can't be solved. (@free5lot, please verify :) )

Also, the key-combination is not working either on my version of this patch.

@JanmanX JanmanX changed the title Ctrl-Shift-T not working(!) Ctrl-Shift-T not working Mar 7, 2015
@free5lot
Copy link
Owner

free5lot commented Mar 7, 2015


UPD (2020) for readers from future: the real workaround for Ctrl(Fn)+Shift+T combination is to release Ctrl(Fn) key first in this combination.
Also see: https://github.com/free5lot/hid-apple-patched#limitations

Original message:

NOT CONFIRMED.

Well, first of all I checked and it works for me. I've checked Ctrl+Shirt+T in Firefox and in Konsole (KDE). So, it's really and be a hardware problem of yours but I can't be sure.

Under "Ctrl" we both mean left-bottom key on keyboard with "fn" label on it, yes? :)

Secondly, I cloned the kernel from mainstream repo a week ago and checked, the hid-apple.c file is the same as this patch uses (as original code hid-apple.c.original_(kernel_3.16.0-28)), so everything is up to date.

@free5lot
Copy link
Owner

free5lot commented Mar 7, 2015

Jan, what do you exactly mean with "a problem with the mechanical part of the keyboard"? Is it broken or there is a hardware limitation of fn+2_more_keys events?

@free5lot free5lot self-assigned this Mar 7, 2015
@JanmanX
Copy link
Contributor Author

JanmanX commented Mar 7, 2015

@free5lot
Yes, I press the "fn" which is mapped to ctrl.
To be clear, I press buttons labelled with: FN-LSHIFT-T, which are mapped to LCTRL-LSHIFT-T.

By "problem with mechanical part of the keyboard" I meant a hardware limitation of the keyboard - yes, something like fn+2_more_key events.

I have verified this issue on 2 separate machines running Ubuntu 14.04, but with the same keyboard.

I will try to find any documentation on this FN key...

@free5lot
Copy link
Owner

free5lot commented Mar 7, 2015

Well. Than good news is that Macbook Pro Retina doesn't have this limitation.
And bad one - maybe it'll be unsolvable for you if there is electric limitation on the keyboard's board.
One more chance - try LiveCD of Kubuntu or other KDE-based GNU/Linux. Maybe it's some kind of Gnome's limitation, but I doubt it.

What model of external keyboard do you have exactly?

@JanmanX
Copy link
Contributor Author

JanmanX commented Mar 7, 2015

@free5lot
I have the "Apple Wireless Keyboard" model: A1314 Image.

I have found no documentation on limitations of the FN key, but I have found a very strange behavior.
Using this site, I can press any key with the combination of fn-shift (mapped to ctrl-shift) except "t".

Unfortunatelly, Ubuntu seems to be the only distro that supports my bluetooth drivers out of the box. Installing drivers for my adapter on Kubuntu is a mess, so I cant test it on KDE just yet.

@free5lot
Copy link
Owner

free5lot commented Mar 7, 2015

@JanmanX

Using this site, I can press any key with the combination of fn-shift (mapped to ctrl-shift) except "t".

Quite interesting and strange! So Ctrl+Shift+… almost works for you except T char.
Please try ctrl+shift+… combinations somewhere in Gnomes soft. And maybe in settings where you can set hotkeys.

Maybe Fn+Shift+T means something exceptional on Mac.

@JanmanX
Copy link
Contributor Author

JanmanX commented Mar 7, 2015

@free5lot
Maybe. The Gnome Keyboard shortcut program doesn't register the combination either.

I cannot help any further right now, as I am rather busy, but here is samle output from "xev" of the combination being pressed. Maybe you can make some sense of it:

KeyPress event, serial 37, synthetic NO, window 0x4c00001,
    root 0x2c9, subw 0x0, time 3498322, (16,7), root:(16,59),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x4c00001,
    root 0x2c9, subw 0x0, time 3498772, (16,7), root:(16,59),
    state 0x1, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

-------------------------------- "T" is being pressed, but xev reports KeyRelease event on Left-Shift
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
    root 0x2c9, subw 0x0, time 3500772, (16,7), root:(16,59),
    state 0x5, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

-------------------------------- "T" being released, xev reports KeyPress on Left Shift
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
    root 0x2c9, subw 0x0, time 3501360, (16,7), root:(16,59),
    state 0x4, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

@free5lot
Copy link
Owner

free5lot commented May 1, 2015

So, it seems to be some hardware related problem of external keyboard, and doesn't affect MacBook Pro or other devices, that can get key-press correctly (who doesn't make FN key (Ctrl after modification) as something special on HARDWARE level). So it's not a patch issue and probably can't be fixed for this hardware.
So I'm closing this ticket as on other hardware it was not confirmed.

@free5lot free5lot closed this as completed May 1, 2015
@free5lot free5lot added not hid-apple-patched Issue is not related to the patched version but upstream one. invalid and removed question labels May 1, 2015
@free5lot free5lot removed the invalid label Dec 22, 2015
@migmartri
Copy link

migmartri commented Aug 8, 2016

I can confirm the issue with the "Apple Wireless Keyboard" model: A1314.

@JanmanX did you figure out any solution for the problem?

Thanks,
Miguel

@muesli
Copy link

muesli commented Feb 22, 2017

Same behavior with Wireless Keyboard A1255.

@free5lot
Copy link
Owner

I have an question to guys, who have original MacOS and this external Apple Wireless Keyboards. Can you switch the buttons in MacOS and try ctrl+shift+t there? It may either prove it's a physical limitation or give some hope.

@StephanDollberg
Copy link
Contributor

Can also confirm with A1644. Only T doesn't work. Everything else does.

@free5lot
Copy link
Owner

@StephanDollberg Can you switch the Fn and LeftCtrl buttons in MacOS and try Ctrl+Shift+T there (really Fn+Shift+T actual keys)? Will it work there?

@StephanDollberg
Copy link
Contributor

@free5lot I don't have access to a Mac right now but I might have in a couple weeks (not fully sure yet though). Then I can try.

@free5lot
Copy link
Owner

free5lot commented Feb 6, 2019


UPD (2020): You don't have to press keys in small window or fast. The real workaround for Ctrl(Fn)+Shift+T is to release Ctrl(Fn) key first in these combinations.
See: https://github.com/free5lot/hid-apple-patched#limitations
Anyhow thanks to @djdevin for this information as it was crucial to understand that workaround does exist.

Original message:

Some additional information from @djdevin:

FWIW if you train yourself you might be able to get around this limitation. The keys cannot simultaneously be pressed but you have a small window which may be recognize as simultaneous.

"Roll" up to Control-Shift-T by pressing no more than 2 keys at the same time (control, then shift, then start to pull off as you press T) and you should be able to trick it into thinking you pressed them all together. I accidentally discovered this and I can get it 99% of the time now.

I don't have monster hands so I can't do it with 1 hand which might be more difficult.

@klaeufer
Copy link

Just for the record:

I am using this configuration on an external slim Apple Bluetooth keyboard (A1314):

options hid_apple fnmode=2
options hid_apple swap_fn_leftctrl=1
options hid_apple swap_opt_cmd=1
options hid_apple rightalt_as_rightctrl=1
options hid_apple ejectcd_as_delete=1
  • Control_L Shift_L t works only with "rolling" off the Control_L key as I am pressing the t key
  • Control_L Shift_R t works perfectly
  • Control_R Shift_R t works perfectly (I can live with this one for reopening closed tabs)
  • Control_R Shift_L t works perfectly

Other three-key combinations also work perfectly, e.g.:

  • Control_L Shift_L TAB
  • Control_L Shift_L c
  • Control_L Shift_L v

In sum, I'm grateful for this clean solution for matching my external Apple keyboard to the one built into my Dell XPS laptop.

@free5lot
Copy link
Owner

@almson can you please test this combination using Bluetooth connection mode?

@free5lot free5lot mentioned this issue Mar 31, 2020
@almson
Copy link
Contributor

almson commented Mar 31, 2020

Ctrl+Shift+T doesn't work in Bluetooth mode either, but the trick with "rolling" works! Thanks!

It's pretty common for keyboards to have such limitations. Expensive keyboards advertise their n-key "rollover" https://en.wikipedia.org/wiki/Rollover_(key). Apple must have cut a corner with the Fn key.

@free5lot
Copy link
Owner

free5lot commented Mar 31, 2020

So, it's still a hardware limitation.
Thanks for information.

PS. It's just odd that the only key affected by cutting corners is T key. I have no explanation for this technical decision.

@free5lot free5lot added not-apple Issue or question that is not realated to apple devices and removed not-apple Issue or question that is not realated to apple devices labels Mar 31, 2020
@almson
Copy link
Contributor

almson commented Mar 31, 2020

The entire 5-T-G-B column is affected. Fn+Option+G doesn't register (to use the silkscreened names), as well as Fn+Command+B, and Fn+Control+5.

@free5lot
Copy link
Owner

free5lot commented Apr 1, 2020

The entire 5-T-G-B column is affected.

Oh, that makes more sense then. That indeed seems to be cutting corners by Apple.
Maybe these details should be mentioned at the end of README?
And rolling trick that mitigates this issue for these 3 keys combinations.

PS. On Macbook Pro there is no issue with Ctrl+Shift+T and probably any issue with any column at all.

@Hubro
Copy link

Hubro commented Jun 1, 2020

This also affects me using the Magic Keyboard A1644 over bluetooth.

image

A quick tip to those wondering how to do the "rolling trick". Timing doesn't matter. Just press "Fn+Shift+T", then release the Fn key first. That will always register a Ctrl+Shift+T press.

@free5lot
Copy link
Owner

free5lot commented Jun 8, 2020

A quick tip to those wondering how to do the "rolling trick". Timing doesn't matter. Just press "Fn+Shift+T", then release the Fn key first. That will always register a Ctrl+Shift+T press.

Thanks for the tip. I will add it to the Readme.

@vasilakisfil
Copy link
Contributor

I can confirm that this combination doesn't work in A1644 (nor usb-connected, neither bluetooth connected) and it didn't work in A1242 either, which I had been using for ages. The rolling trick is super helpful though, thanks for the tip! 👍 for adding it to the Readme.

@jc00ke
Copy link

jc00ke commented Sep 29, 2020

Wow, I don't know how @klaeufer found the "rolling-off" trick but thank you! 🙏

@free5lot
Copy link
Owner

@jc00ke well, actually @djdevin was the one who provided information about rolling trick. Plus @almson and @Hubro made the situation more clear and provided the way of using it with 100% success.

@jc00ke
Copy link

jc00ke commented Sep 29, 2020

My bad! Thanks all around!

@willmo
Copy link

willmo commented Mar 20, 2023

FWIW, not sure if it's already known, but in testing with A1644 (ANSI US English) connected via USB to macOS 13.2.1, and mapping the physical fn key to ctrl, I can reproduce the issue with T, but not with 5-G-B. So it's at least partly an OS-independent issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not hid-apple-patched Issue is not related to the patched version but upstream one.
Projects
None yet
Development

No branches or pull requests