bugGNUstep - Bugs: bug #30537, The NSShiftKeyMask bit in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30537: The NSShiftKeyMask bit in modifierFlags during -flagsChanged:

Submitted by:  Derek Fawcus <dfawcus>
Submitted on:  Sat 24 Jul 2010 09:20:08 AM UTC  
 
Category: BackendSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Sun 25 Jul 2010 07:42:49 PM UTC, comment #1:

Thank you for this patch. I submitted it and now things work as expected for me. (Although I had to set the GSModifiersAreKeys default first, but that is an unrelated issue)

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sat 24 Jul 2010 09:20:08 AM UTC, original submission:

As noted in the source comments the X state flags are updated after a key press/release, and as such they cannot be relied upon to indicate the correct Openstep modifier state (as the modifier changes). However despite this, the code does depend upon the X state for the shift keys.

As such, a shift press results in flagsChanged: being invoked with the NSShiftKeyMask bit clear, and a shift release in an invocation with the bit set.

The fix is obvious, namely to treat the shift modifier in the same manner as the other modifers (control/command/alternate).

Suggested diffs are attached, along with a program which demonstrates the issue.

Derek Fawcus <dfawcus>

 

Attached Files
file #21046:  EvK.tar.gz added by dfawcus (5KiB - application/x-gzip - Suggested diffs and demonstration program.)
file #21045:  Shift-Fix.gdiff added by dfawcus (4KiB - application/octet-stream - Suggested diffs and demonstration program.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by dfawcus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 25 Jul 2010 07:42:49 PM UTCFredKieferStatusNone=>Fixed
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>Closed
    Sat 24 Jul 2010 09:20:10 AM UTCdfawcusAttached File-=>Added Shift-Fix.gdiff, #21045
      Attached File-=>Added EvK.tar.gz, #21046

    Back to the top


    Powered by Savane 3.1-cleanup1