[Eric] Mac Fonts and Keyboard Shortcuts

detlev detlev at die-offenbachs.de
Tue Jan 19 19:35:59 GMT 2010


Hi,

on my system they are not saved as hexadecimal. Actually the code uses 
"QString(act.alternateShortcut())" where act is a reference to the action and 
this string is encoded as utf-8. So it's 
str(QString(act.alternateShortcut())).encode("utf-8").

Does your shortcut return something different?

Detlev

On Dienstag, 19. Januar 2010, Larry Shaffer wrote:
> Hi Detlev,
> 
> > What do you get, if you reassign "Enter" as the alternate shortcut in the
> > shortcuts dialog? If it shows Return, than it is a Mac problem. Please
> > try QKeySequence for these entries.
> 
> According to http://doc.qt.nokia.com/4.6/qkeysequence.html (and 4.5) the
> Mac's recognized keys should be:
> 
> InsertParagraphSeparator <vm_edit_insert_line> is Enter (not Return)
> InsertLineSeparator <vm_edit_insert_line_below> is Meta+Enter (not
> Shift+Enter)
> 
> However, eric4 does map the keys correctly for the Mac keyboard, with
>  Return mapped to the Return key and Enter mapped to the Enter key on the
>  numeric keypad. The right keys are being mapped, just Enter is not stored
>  correctly.
> 
> If after I apply the fix I noted and then manually add the Enter
> alternatives, or when eric4 is first installed and shortcuts haven't been
> applied (eric4.ini doesn't yet include stored shortcuts), eric4 works as
> expected, with each key being respectively turned on or off. If, however,
> the eric4.ini is ever written to, the sequences with an Enter Qt::Key in
> them are written to eric4.ini as a hexadecimal Return.
> 
> Maybe store the shortcuts as ASCII text in eric4.ini, like displayed in the
> dialog, instead of hexadecimal? I think conversion to hexadecimal on Mac is
> where the error is creeping in. The text representation of the keys seems
>  to always work.
> 
> > From: detlev <detlev at die-offenbachs.de>
> > Date: Mon, 18 Jan 2010 19:24:47 +0100
> > To: <eric at riverbankcomputing.com>
> > Cc: Larry Shaffer <larrys at dakotacarto.com>
> > Subject: Re: [Eric] Mac Fonts and Keyboard Shortcuts
> >
> > On Montag, 18. Januar 2010, Larry Shaffer wrote:
> >> Hello,
> >>
> >> I'm seeing two issues with the latest eric4-4.4.0 on my Mac, otherwise
> >> it's running great:
> >>
> >> 1) Keyboard Shortcuts
> >>
> >> Any adjustment to Keyboard Shortcuts (editing, importing, etc.) causes
> >> the shortcuts to be written to the eric4.ini file, which causes the
> >> initialized default shortcuts and alternates for 'vm_edit_insert_line'
> >> (return, enter) and 'vm_edit_insert_line_below' (shift-return,
> >> shift-enter) to be written as the same for both their shortcut and
> >> alternate.
> >>
> >> In other words, 'vm_edit_insert_line' becomes (return, return) and
> >> 'vm_edit_insert_line_below' (shift-return, shift-return), which
> >> immediately makes the editor unusable because any new line raises the
> >> following error:
> >>
> >> Warning: QAction::eventFilter: Ambiguous shortcut overload: ?
> >>
> >> The customized shortcuts that were added work, but on change, the
> >> shortcut saving writer is treating 'enter' synonymous to 'return' on my
> >> Mac and consistently writes the ambiguous duplicate alternative
> >> shortcuts.
> >
> > What do you get, if you reassign "Enter" as the alternate shortcut in the
> > shortcuts dialog? If it shows Return, than it is a Mac problem. Please
> > try QKeySequence for these entries.
> >
> > Unfortunately I do not own a Mac and cannot test it.
> >
> >> A
> >> workaround in ViewManager.py is to nix the default alternative shortcuts
> >> (attached). This works, only after deleting the incorrect alternatives
> >>  saved in eric4.ini and re-launching, but it's not a fix for the
> >> problem.
> >>
> >> 2) Fonts
> >>
> >> Since moving over to the new 4.4.0 stable version I can no longer change
> >>  any font settings. Worked with the previous unstable version.
> >> Everything is stuck on Lucida Grande, 13 pt, which is probably the
> >> system's default, and looks nice, but not monospaced.
> >
> > That is even stranger because there was no change in this area between
> > last unstable and stable release.
> >
> > Regards,
> > Detlev
> 



-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list