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-enter toggles fullscreen (in addition to ctrl-alt-enter) #540

Closed
sirianni opened this issue Apr 3, 2012 · 10 comments
Closed

ctrl-enter toggles fullscreen (in addition to ctrl-alt-enter) #540

sirianni opened this issue Apr 3, 2012 · 10 comments
Assignees
Labels

Comments

@sirianni
Copy link

sirianni commented Apr 3, 2012

In FreeRDP 1.0.1 both 'ctrl-enter' and 'ctrl-alt-enter' toggle FullScreen mode. This is problematic since ctrl-enter is a standard shortcut in applications like MS Outlook for "Send Email".

The man page states that 'ctrl-alt-enter' is the shortcut.

@arpiondarkness
Copy link

Hi, to solve this issue try to redirect both stderr and stdout to "fake" file likes this:

xfreerdp -u USERNAME -d DOMAIN -f --plugin cliprdr REMOTECLIENT 2>&1 fakeFILE

I'm using freerdp 0.8.2 on FC14 and it works fine with win7 / outlook 2010

@dorianj
Copy link

dorianj commented Jul 6, 2012

What OS are you seeing this on? On Ubuntu 12.04, only ctrl-enter triggers the key shortcut for me.

The code is thus:

        if ((xf_kbd_key_pressed(xfi, XK_Alt_L) || xf_kbd_key_pressed(xfi, XK_Alt_R))
            && (xf_kbd_key_pressed(xfi, XK_Control_L) || xf_kbd_key_pressed(xfi, XK_Control_R)))
        {
            /* Ctrl-Alt-Enter: toggle full screen */
            xf_toggle_fullscreen(xfi);
            return true;
        }

so I don't know why it would trigger when only ctrl is pressed.

@sirianni
Copy link
Author

sirianni commented Jul 9, 2012

Ubuntu 12.04.

Could the issue be when the ALT key is still depressed when focus leaves the RDP window? When the window is re-entered Xfreerdp might still think the ALT key is depressed even though it isn't (the target windows OS does not think that ALT is pressed however)

What leads me to believe this is that pressing the ALT key a bunch of times in the RDP session "resets" the condition and then CTRL-ENTER works as expected (does not toggle fullscreen).

@dorianj
Copy link

dorianj commented Jul 9, 2012

Good thinking, that's probably the most likely scenario.

Some other clients use extra logic on gaining and losing focus to clear these things.

I'll leave this open, it's certainly an annoying bug to live with.

@pfmooney
Copy link
Contributor

pfmooney commented Aug 2, 2012

I've encountered this issue as well. As sirianni, mentioned, it has to do with keys being depressed when the window loses focus. Depending on your WM and how it's configured, the problem can appear often.

Clearing the data structure of depressed keys on loss of focus would alleviate the problem.

pfmooney added a commit to pfmooney/FreeRDP that referenced this issue Aug 2, 2012
Clear xfi->pressed_keys when window loses focus.
This would prevent a held alt key from putting the app into fullscreen if the
users sends ctrl+enter when the app regains focus.
@pfmooney
Copy link
Contributor

pfmooney commented Aug 2, 2012

I've published my fix here:
pfmooney@7cf594a

While it solve the unwanted full-screen initiation due to the alt key, it should be noted that keys are still assumed to be depressed inside the RDP session. That becomes an issue for me when using the Win key as a modifier in my WM. If the Win key is depressed when xfreerdp loses focus, letters typed in the window after I return behave as if I'm still holding the key (such as 'r' opening the run dialog). A call to "xf_kbd_release_all_keypress" during focus-out but prior to the xf_kbd_clear (perhaps as part of it) would solve that problem.
I did not include that in my commit as I was unsure of negative effects elsewhere.

Feedback would be appreciated.

@pfmooney
Copy link
Contributor

Does anyone have input on how I should go about pursuing the inclusion of that fix in one form or another?

@dorianj
Copy link

dorianj commented Aug 23, 2012

@pfmooney Submit a pull request.

@pfmooney
Copy link
Contributor

Will do. Thanks.

pfmooney added a commit to pfmooney/FreeRDP that referenced this issue Aug 30, 2012
Clear xfi->pressed_keys when window loses focus.
This would prevent a held alt key from putting the app into fullscreen if the
users sends ctrl+enter when the app regains focus.
@ghost ghost assigned bmiklautz Sep 10, 2012
@bmiklautz
Copy link
Member

Fixed in master with commit 7cf594a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants