Closed Bug 148733 Opened 23 years ago Closed 23 years ago

Meta accelerator key, but alt to go back and forward?

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME
Future

People

(Reporter: reidr, Assigned: akkzilla)

Details

(Keywords: helpwanted)

I hope this isn't a moronic question.... I just went through an ordeal trying to straighten out my keyboard alt/meta/keysyms/modifiers. (Somehow, it got into a state where Alt-d on my keyboard wasn't killing the next word in xterm....) I ran xkeycaps to set it up so that the Windows and Alt keys on the left are swapped; the Windows key sends the Alt_L keysym and Mod1, and the Alt key sends Meta_L and Mod4. (I prefer to use the physical key labelled "Alt" for everything.) I set it up so that Mozilla uses 18 for the accelerator key. Most everything now works when I hit the "Alt" key (i.e. Meta), except back, forward, and home still use Alt. They're the only things in my menus that refer to Alt, the rest refer to Meta, so I have to use the Windows key just for those functions. It seems to me like they should all use Meta (and, in fact, that's somehow the way it was for me before I started messing around). Is there some reason only those navigation functions use Alt? Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0+) Gecko/20020529
changing component
Assignee: Matti → aaronl
Component: Browser-General → Keyboard Navigation
QA Contact: imajes-qa → sairuh
-> akk, UNIX keyboard stuff
Assignee: aaronl → akkana
I do know why left and right arrows might be treated differently from the others: most mozilla window-level functions (e.g. close window, go to urlbar, exit app, etc.) are on the accel key (the one you rebound to 18), but alt-left and alt-right are not, because for those two, the standard windows bindings actually are on alt rather than ctrl. I'm guessing that what's happening is that your key remapping has caused gtk to change the bitmask but not the keycode, or vice versa, so that we end up triggering accel on the windows key, but still triggering alt on the alt key. Understanding it better than that might require someone to spend a lot of time in the bowels of gtk key handling code, and since gtk is in the middle of changing to gtk2, it's hard to justify spending a lot of time debugging specifics of gtk1. We have some other issues with how we handle rebound accel keys (like getting meta to work at all) and it's hard to find something that works for everyone because different combinations of xmodmaps and gtk versions make things work differently. I'd suggest that a better approach might be to find a workaround: try making custom bindings in mozilla for left and right on both alt- and meta for VK_LEFT/RIGHT (see http://www.mozilla.org/unix/customizing.html for a basic outline, but you might have to fiddle with it a bit to get it to work), or try one and if it doesn't do what you want, try the other. If you do get it to work, please let me know what you did, and I'll make a section of the customizing document discussing xmodmap rebinding issues and how to work around them.
Keywords: helpwanted
Target Milestone: --- → Future
Thanks for the info. I tried adding these lines to userHTMLbindings.xml in res/builtin (actually a link to my personal chrome directory), but it doesn't seem to have changed anything: <?xml version="1.0"?> <!-- In order to work correctly, this file must live in the --> <!-- res/builtin directory of the mozilla tree. --> <bindings id="htmlBindings" xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="browserUser"> <handlers> <handler event="keypress" keycode="VK_LEFT" modifiers="alt,meta" command="cmd_Back"/> <handler event="keypress" keycode="VK_RIGHT" modifiers="alt,meta" command="cmd_Forward"/> </handlers> </binding> </bindings> I also tried adding them directly to res/builtin/htmlBindings.xml, still nothing. If you think this is worth pursuing, is there some way to debug my key bindings? The strange thing is that before this weekend, the Meta-fied Alt key DID work. And it currently does at home, too (this is my work machine). I tried to change my keys via xmodmap to match, but I must have screwed something up, because that didn't work either. I've done some strange things before like making that key generate both Meta and Alt or both Mod1 and Mod4, which didn't feel right....
Component: Keyboard Navigation → Browser-General
Target Milestone: Future → ---
modifiers="alt,meta" means that the binding will only fire if both alt and meta are pressed. Try making separate bindings, one with meta, one with alt. But I've seen other problems with browserUser bindings; I have a bad feeling that we may have a regression and browserUser bindings may not be working at all. > The strange thing is that before this weekend, the Meta-fied Alt key DID work. That is very strange. Is this on trunk or branch? I'm not aware of anyone who's working on anything that should have changed that (not that I necessarily would be aware of it) so I wonder if it's something about your keymap that changed. Do you have any earlier build, or could you possibly download one and see if an earlier version of mozilla behaves differently?
Oops, thanks for catching the "alt,meta" screwup. Fixing that didn't fix the bigger problem, though. I'm pretty sure I was doing something funky with my xmodmap settings that enabled me to get things working. It'd been working for a long time, and I regularly download nightlies. Again, this broke when I started fooling around with xkeycaps to fix an unrelated problem. I think some recent upgrades to my RedHat XFree86 packages changed the way the meta key was being handled, which started this whole mess. The bottom line is I don't think it was any particular version of mozilla that got this working or broke it. It's still working fine on my home PC. If you're interested, I could send you the output of xmodmap there.
Target Milestone: --- → Future
This bug is currently UNCONFIRMED in Browser-General. Should it be marked NEW, or is it an invalid bug?
I have some updated info on this. I was finally able to get my key labeled "Alt" to do everything, including back and forward, as I wanted. I accomplished it by basically importing xmodmap settings from another computer that I knew worked. There may be a valid bug in here somewhere, but as I suspected all along, my particular problem was an xmodmap issue.
Marking WFM per comment #8
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
v per reporter.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.