DreamPie in OS X

72 views
Skip to first unread message

Rob

unread,
Jul 18, 2010, 11:59:01 PM7/18/10
to DreamPie
I can't get the history since I use control+arrow keys to change
spaces. Is there any way to change the key binding, or get around
this? Also, is it possible to disable the beep?

Thanks,
Rob

Noam Yorav-Raphael

unread,
Jul 20, 2010, 11:58:16 AM7/20/10
to drea...@googlegroups.com
It's not "official", but you can:

To change the keyboard shortcuts, search share/dreampie/dreampie.glade for:

<accelerator key="Up" signal="activate" modifiers="GDK_CONTROL_MASK"/>

and replace it with whatever suits you. The same goes to "Down".

To disable the beep, add at the end of dreampielib/gui/beep.py:

def beep():
pass

Is this a common keyboard shortcut on Macs, or is it something you
chose? If it is common, would you suggest another shortcut?

Thanks,
Noam

Rob Lourens

unread,
Jul 20, 2010, 7:49:40 PM7/20/10
to drea...@googlegroups.com
Thanks Noam. Control+arrow keys is the default key combo for changing Spaces in OS X. I don't know whether people commonly change that. One platform-independent solution would be to add page up/page down (Fn + arrow keys in OS X) as additional accelerators to do the same thing. They don't seem to be used for anything else in DreamPie. Attached is a patch if you like the idea. If there are any other OS X users on this list, chime in.

Modifying beep.py as you said got rid of beeping sometimes, such as for a syntax error, but not always- it still beeps for using the arrow keys when the input box is empty, for example. It doesn't look like those beeps are coming from DreamPie code, must just be from X11. Not a big deal.

Just out of curiosity, is there any reason you used GTK rather than say Tkinter?


Thanks,
Rob
dreampie.glade.patch

Noam Yorav-Raphael

unread,
Jul 22, 2010, 6:37:36 PM7/22/10
to drea...@googlegroups.com
On Wed, Jul 21, 2010 at 12:49 AM, Rob Lourens <roblo...@gmail.com> wrote:
> Thanks Noam. Control+arrow keys is the default key combo for changing Spaces
> in OS X. I don't know whether people commonly change that. One
> platform-independent solution would be to add page up/page down (Fn + arrow
> keys in OS X) as additional accelerators to do the same thing. They don't
> seem to be used for anything else in DreamPie. Attached is a patch if you
> like the idea. If there are any other OS X users on this list, chime in.

Thanks, I like the idea. I will add it when I come back of vacation.

> Modifying beep.py as you said got rid of beeping sometimes, such as for a
> syntax error, but not always- it still beeps for using the arrow keys when
> the input box is empty, for example. It doesn't look like those beeps are
> coming from DreamPie code, must just be from X11. Not a big deal.

Too bad... If you come up with a solution, please tell me.

> Just out of curiosity, is there any reason you used GTK rather than say
> Tkinter?

Yes, Tkinter is old and doesn't look good on neither linux nor
windows. Also, its event system is horrible (no way to connect
multiple handlers to one event) and its text box is slow (so IDLE gets
stuck with too much text displayed.)

I could have used Qt, which has much better Mac support and probably
better Windows support. I chose GTK because I thought there would be
less problems with its Windows support (it's mostly ok, but still has
problems), and because it has a much more pleasant Python bindings,
including native Python documentation. I'm not sure if it was the
right decision, but I don't think changing to Qt at this stage would
be reasonable.

Noam

Noam

unread,
Sep 12, 2010, 10:00:51 AM9/12/10
to DreamPie
Hello,

I just commited (in revision 194) a change that enables both ctrl-up
and ctrl-pgup shortcuts on all platforms, and displays in the menu
ctrl-pgup for mac and ctrl-up for all other platforms (and the same
for ctrl-down, of course.)

Can you test it before I release a new version, to see if it works
well?

Thanks,
Noam

On Jul 21, 1:49 am, Rob Lourens <roblour...@gmail.com> wrote:
> Thanks Noam. Control+arrow keys is the default key combo for changing Spaces
> in OS X. I don't know whether people commonly change that. One
> platform-independent solution would be to add page up/page down (Fn + arrow
> keys in OS X) as additional accelerators to do the same thing. They don't
> seem to be used for anything else in DreamPie. Attached is a patch if you
> like the idea. If there are any other OS X users on this list, chime in.
>
> Modifying beep.py as you said got rid of beeping sometimes, such as for a
> syntax error, but not always- it still beeps for using the arrow keys when
> the input box is empty, for example. It doesn't look like those beeps are
> coming from DreamPie code, must just be from X11. Not a big deal.
>
> Just out of curiosity, is there any reason you used GTK rather than say
> Tkinter?
>
> Thanks,
> Rob
>
> On Tue, Jul 20, 2010 at 10:58 AM, Noam Yorav-Raphael <noamr...@gmail.com>wrote:
>
>
>
> > It's not "official", but you can:
>
> > To change the keyboard shortcuts, search share/dreampie/dreampie.glade for:
>
> > <accelerator key="Up" signal="activate" modifiers="GDK_CONTROL_MASK"/>
>
> > and replace it with whatever suits you. The same goes to "Down".
>
> > To disable the beep, add at the end of dreampielib/gui/beep.py:
>
> > def beep():
> >    pass
>
> > Is this a common keyboard shortcut on Macs, or is it something you
> > chose? If it is common, would you suggest another shortcut?
>
> > Thanks,
> > Noam
>
> > On Mon, Jul 19, 2010 at 4:59 AM, Rob <roblour...@gmail.com> wrote:
>
> > > I can't get the history since I use control+arrow keys to change
> > > spaces. Is there any way to change the key binding, or get around
> > > this? Also, is it possible to disable the beep?
>
> > > Thanks,
> > > Rob
>
>  dreampie.glade.patch
> < 1KViewDownload

Beni Cherniavsky-Paskin

unread,
Sep 12, 2010, 11:41:01 AM9/12/10
to drea...@googlegroups.com
On Sun, Sep 12, 2010 at 16:00, Noam <noam...@gmail.com> wrote:
>
> Hello,
>
> I just commited (in revision 194) a change that enables both ctrl-up
> and ctrl-pgup shortcuts on all platforms, and displays in the menu
> ctrl-pgup for mac and ctrl-up for all other platforms (and the same
> for ctrl-down, of course.)
>
> Can you test it before I release a new version, to see if it works
> well?
>
Testing r195 on linux, all shortcuts (and menu label) work.

P.S. it seems that lines of 2 chars or less are inaccessible via
history up/down.
Is this a feature? I can see how it helps with e.g. pdb, but it's
somewhat confusing...

--
Beni Cherniavsky-Paskin <cb...@users.sf.net>

Noam Yorav-Raphael

unread,
Sep 12, 2010, 3:54:42 PM9/12/10
to drea...@googlegroups.com
On Sun, Sep 12, 2010 at 6:41 PM, Beni Cherniavsky-Paskin
<cb...@users.sf.net> wrote:
>
> On Sun, Sep 12, 2010 at 16:00, Noam <noam...@gmail.com> wrote:
> >
> > Hello,
> >
> > I just commited (in revision 194) a change that enables both ctrl-up
> > and ctrl-pgup shortcuts on all platforms, and displays in the menu
> > ctrl-pgup for mac and ctrl-up for all other platforms (and the same
> > for ctrl-down, of course.)
> >
> > Can you test it before I release a new version, to see if it works
> > well?
> >
> Testing r195 on linux, all shortcuts (and menu label) work.

Great!


>
> P.S. it seems that lines of 2 chars or less are inaccessible via
> history up/down.
> Is this a feature?  I can see how it helps with e.g. pdb, but it's
> somewhat confusing...

It's a feature, which indeed was meant to help with pdb. But maybe it
should be improved.

What do you think about only allowing 2-character commands if they are
one of the last three commands? Beyond that I really think it makes no
sense to want to recall them.

Rob Lourens

unread,
Sep 13, 2010, 1:50:58 AM9/13/10
to drea...@googlegroups.com
No problems with r195 on OS X. ctrl-pgup/down works great. Thanks!

Rob
Reply all
Reply to author
Forward
0 new messages