Opened 13 years ago

Closed 12 years ago

#8561 closed enhancement (fixed)

[Team monitor] add Delete shortcut to kill selected team

Reported by: diver Owned by: korli
Priority: normal Milestone: R1
Component: Add-Ons/Input Filters Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

It should probably prompt user before killing it.

Change History (11)

comment:1 by phoudoin, 13 years ago

With a prompt it wont be a shortcut anymore ;-)

Instead, by using modifier(s), a Command key (+option key?) + Delete will be an actual shortcut while keeping some errorproofness...

comment:2 by leavengood, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev44231 by using Command + Option + K for kill and Command + Option + Q for quit of the selected application. This mimics the existing Command + Option + T to open a terminal.

comment:3 by diver, 12 years ago

Resolution: fixed
Status: closedreopened

Thanks, but actually I wanted to use Del key as it is very close to arrow keys and it is very handy to use it to kill things.

comment:4 by diver, 12 years ago

This would mimic deletion in Tracker btw.

comment:5 by humdinger, 12 years ago

DEL for quitting and SHIFT+DEL for killing would be good shortcuts for commands.
ALT+OPT+anything might be good to summon other apps, like Terminal-T, Debugger-D or... Hangman-H... :)

comment:6 by axeld, 12 years ago

Since quitting an app should not result in any data loss, I think having a simple shortcut would be nice. For example, Deskbar's team switcher uses 'q' to quit an application. I would be all for a consistent solution here, whether it's 'q', 'delete' or both I don't particularly care, although I tend towards keeping 'q' at least, since that already a known shortcut to quit an application.

I agree with humdinger that the cmd+opt+letter shortcuts should be reserved for other means.

comment:7 by leavengood, 12 years ago

Fair enough, I'll add some keyboard handling where delete or q quit the selected app, and shift-delete or k kills it, and I'll remove the extra Command + Option shortcuts. I really wish I had already committed my "B_NO_COMMAND_KEY" shortcut changes because that would make this much easier ;)

Hmmm, maybe this is good enough motivation to finish that. Well we will see.

comment:8 by leavengood, 12 years ago

I tried working on this but for some reason it seems the Team Monitor window does not get key down messages. Shortcuts work though, so I'm definitely confused. Anyone have an idea what might be wrong? I'd attach a patch, but it is as simple as adding a B_KEY_DOWN section to MessageReceived...

comment:9 by axeld, 12 years ago

One cannot possibly know what you are doing, but in order to retrieve keyboard events, your view must either have focus (for example via BView::MakeFocus()), or need to have an event mask set that allows him to retrieve all keyboard input.

comment:10 by anevilyak, 12 years ago

Correct me if I'm wrong, but I thought B_KEY_DOWN gets dispatched to the KeyDown() virtual function before it ever reaches MessageReceived() anyways, so it can't be captured there (except by alternative means like a message filter).

comment:11 by leavengood, 12 years ago

Resolution: fixed
Status: reopenedclosed

Should finally be fixed in hrev44454. My problem was I was trying to handle the key down in the window, but that can only be done by overriding DispatchMessage or using a BMessageFilter (previously I was trying to use MessageReceived.) I decided to go with the filter, mimicking the existing app-level filter for locale changes.

Note: See TracTickets for help on using tickets.