On Wed, Jan 25, 2017 at 12:47 AM, Ignacy Gawędzki <bugs@xxxxxxxx> wrote: > Hi, > > There is a bug in the processing of the Fn key on the first generation > of Dell XPS 13 laptops (at least models L321X and L322X have the problem). > It happens with the combinations for Home, End, Page Up and Page Down > keys, achieved with pressing Fn with respectively Left, Right, Up and > Down. If the Fn key is released before the other key, the release of > the other key is not passed through. In that case, an auto-repeat of > the key may activate itself until any other key is pressed. > > This is confirmed by running evtest: > > Event: time 1485332907.361701, type 4 (EV_MSC), code 4 (MSC_SCAN), value cf > Event: time 1485332907.361701, type 1 (EV_KEY), code 107 (KEY_END), value 1 > Event: time 1485332907.659714, type 4 (EV_MSC), code 4 (MSC_SCAN), value cd > > The second MSC_SCAN happens when the Fn key is released and after it, > until any key is pressed again, the End key is considered pressed and > auto-repeating eventually starts. > > Another similar situation happens if for instance the Right key is > pressed, then the Fn key is pressed before the Right key is released. > The subsequent release of the Right key is not passed through: > > Event: time 1485333101.589438, type 4 (EV_MSC), code 4 (MSC_SCAN), value cd > Event: time 1485333101.589438, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1 > Event: time 1485333101.959561, type 4 (EV_MSC), code 4 (MSC_SCAN), value cf OK, so 'cd' is scancode for KEY_RIGHT and 'cf' is scancode for KEY_END, and it seems that implementation of FN handling is very naive as it emits "release" keycodes for the state FN is currently in, not the state it was when key was pressed. Ideally Dell would fix that. Mario, any chance of that? Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html