Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.development > #8862 > unrolled thread
| Started by | James Harris <james.harris.1@gmail.com> |
|---|---|
| First post | 2015-10-02 11:42 +0100 |
| Last post | 2015-12-27 23:22 +0100 |
| Articles | 20 on this page of 77 — 7 participants |
Back to article view | Back to alt.os.development
Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-02 11:42 +0100
Re: Flow of keystroke messages in a UI Bernhard Schornak <schornak@web.de> - 2015-10-02 20:43 +0200
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-04 15:23 +0100
Re: Flow of keystroke messages in a UI Bernhard Schornak <schornak@web.de> - 2015-10-05 17:38 +0200
Re: Flow of keystroke messages in a UI "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-02 17:17 -0400
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-04 16:36 +0100
Re: Flow of keystroke messages in a UI "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-04 21:27 -0400
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-05 15:01 +0100
Re: Flow of keystroke messages in a UI "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-05 21:57 -0400
Re: halting Adobe Flash videos with Mozilla Firefox, was [Re: Flow of keystroke messages in a UI] "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-26 04:35 -0400
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-12-27 12:40 +0000
Re: Flow of keystroke messages in a UI "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-12-27 15:51 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-03 12:08 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-03 14:55 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-13 17:58 +0000
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-15 11:32 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-16 03:29 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-16 13:44 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-16 12:55 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-16 19:55 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-18 07:39 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-18 22:45 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-19 22:28 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-27 13:27 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-27 17:20 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-28 11:03 +0000
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-22 17:43 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-23 13:17 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-27 13:42 +0000
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-04-08 09:14 +0100
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-14 09:56 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-14 09:11 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-14 15:58 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-15 05:55 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-15 15:57 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-16 05:33 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-24 06:16 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-24 18:03 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-28 06:25 +0000
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-02-28 00:21 -0800
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-28 08:45 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-28 20:40 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-03-02 14:49 +0000
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-03-02 21:50 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-03-05 06:09 +0000
OT politics was Re: Flow of keystroke messages in a UI "Kerr Mudd-John" <admin@127.0.0.1> - 2016-03-05 12:40 +0000
Re: OT politics was Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-03-05 20:11 -0500
Re: OT politics, was [Re: Flow of keystroke messages in a UI] Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-03-05 20:11 -0500
Re: OT politics, was [Re: Flow of keystroke messages in a UI] James Harris <james.harris.1@gmail.com> - 2016-03-17 16:35 +0000
Re: OT politics, was [Re: Flow of keystroke messages in a UI] Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-03-17 21:02 -0400
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-24 20:09 -0500
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-02-25 14:55 +0000
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-02-16 03:56 -0800
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-17 04:21 -0500
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-02-24 02:12 -0800
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-24 18:03 -0500
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-02-28 02:53 -0800
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-02-28 20:15 -0500
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-03-27 20:37 -0700
Re: Flow of keystroke messages in a UI Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-03-28 18:23 -0400
Re: Flow of keystroke messages in a UI "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-03-27 21:10 -0700
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-15 14:34 +0000
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2016-01-15 15:10 +0000
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-05 15:39 +0100
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-10-03 12:48 +0200
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-04 17:00 +0100
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-10-04 23:32 +0200
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-05 14:05 +0100
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-05 15:17 +0100
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-10-06 10:35 +0200
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-06 16:28 +0100
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-10-06 19:14 +0200
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-10-06 20:02 +0100
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-10-06 10:46 +0200
Re: Flow of keystroke messages in a UI "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-07 01:16 -0400
Re: Flow of keystroke messages in a UI James Harris <james.harris.1@gmail.com> - 2015-12-27 12:50 +0000
Re: Flow of keystroke messages in a UI "wolfgang kern" <nowhere@never.at> - 2015-12-27 23:22 +0100
Page 1 of 4 [1] 2 3 4 Next page →
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2015-10-02 11:42 +0100 |
| Subject | Flow of keystroke messages in a UI |
| Message-ID | <mulmv6$1hv$1@dont-email.me> |
Any of you guys come up with a good way to handle keystrokes in a UI when multiple elements of that UI may be 'interested' in receiving them? If you have not come up with your own idea are you aware of any good standards or recommendations? I say "good" above because AFAICS even popular implementations don't necessarily get it right. For example, with some apps under Windows pressing Alt and releasing it highlights the first drop-down menu item - usually File. If you then press the Windows key (the key based on Control+Esc) it may seem to be inhibited; instead of opening the Windows Start menu nothing happens. IMO the windowing system should always intercept keys like that one and Alt+Tab. I just tried the above test on a few application windows. Notably, the problem exists in this PC's (Win7) version of Task Manager and Notepad but not Thunderbird. With the latter, even if the File menu is highlighted (as described above) the Windows key is still obeyed by the Windows GUI shell. IMO that is better. But the difference in effects is obviously an inconsistency. It is also indicative of what may be happening. It seems that keystrokes (all keystrokes?) are delivered first to the app window or the focussed widget and that the OS windowing system only gets to see those that the widget and the app pass along. ISTM that that's a bad idea as it allows such keys to be captured by the app. A poorly or maliciously written app could cause them to be ignored or, worse, perhaps choose to do things which look right but are not as expected or do something devious in the background (e.g. keystroke logging). To confirm that interpretation of events, note this comment from Microsoft: "If your window procedure must process a system keystroke message, make sure that after processing the message the procedure passes it to the DefWindowProc function. Otherwise, all system operations involving the ALT key will be disabled whenever the window has the keyboard focus. That is, the user won't be able to access the window's menus or System menu, or use the ALT+ESC or ALT+TAB key combination to activate a different window." That's not good. The quote is from https://msdn.microsoft.com/en-gb/library/windows/desktop/ms646267%28v=vs.85%29.aspx#_win32_System_and_Nonsystem_Keystrokes Other examples are viewing Youtube videos or reading Yahoo mail in a browser. Such sites can prevent a user typing Alt+F from getting the File menu and, instead, interpret such keystrokes in the web page. That's a similar problem to the one mentioned above. ISTM that there has to be a better design than that. Hence this post. To illustrate potential options: Imagine a chain of UI elements from the widget which currently has focus up through each of its parents in turn to its window and then up again to the windowing system shell. If keystrokes are passed to the lowest level (the focussed widget) first then we can get the problems above. If they are passed in the other direction, though, would that be better? Or would it mean that things like Control+C would be picked up as a Copy command even in windows like a terminal where it should generate an ASCII 3? Some alternatives: 1) pass keystroke info down instead of up, i.e. from the UI shell down a step at a time until something absorbs the keystroke info or we get to the focussed widget, 2) pass keystroke info down then back up - i.e. where each UI element gets two distinct chances to choose whether to absorb it or not, 3) let the windowing shell get first dibs for the really important keys and then pass from the bottom up, etc. In each case I am thinking that the first UI element which as an 'interest' in the keystroke basically getting the first chance either to absorb it or to ignore it. I hope that makes sense. Any ideas? Even if you have not thought of this before I would be interested to hear what you think and what your opinions are. BTW, I know there are some messages outstanding on other threads. I am not ignoring them. Will get to them shortly. James
[toc] | [next] | [standalone]
| From | Bernhard Schornak <schornak@web.de> |
|---|---|
| Date | 2015-10-02 20:43 +0200 |
| Message-ID | <mumj59$g7p$1@dont-email.me> |
| In reply to | #8862 |
James Harris wrote: > Other examples are viewing Youtube videos or reading Yahoo mail in a browser. Such sites can prevent > a user typing Alt+F from getting the File menu and, instead, interpret such keystrokes in the web > page. That's a similar problem to the one mentioned above. The underlying mechanism is called "accellerator table". Each GUI program can re-define keystrokes (incl. combinations with ALT, CONTROL, SHIFT) by adding an ACCELLERATORS statement and the key definitions in its resource file (*.rc). It is useful if sparsely used combinations get new meaning, but might also be abused to prevent the user from saving copyrighted data to her/his hard drive. Greetings from Augsburg Bernhard Schornak
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2015-10-04 15:23 +0100 |
| Message-ID | <murcl6$e4a$1@dont-email.me> |
| In reply to | #8863 |
On 02/10/2015 19:43, Bernhard Schornak wrote: > James Harris wrote: > > >> Other examples are viewing Youtube videos or reading Yahoo mail in a >> browser. Such sites can prevent >> a user typing Alt+F from getting the File menu and, instead, interpret >> such keystrokes in the web >> page. That's a similar problem to the one mentioned above. > > > The underlying mechanism is called "accellerator table". Each > GUI program can re-define keystrokes (incl. combinations with > ALT, CONTROL, SHIFT) by adding an ACCELLERATORS statement and > the key definitions in its resource file (*.rc). I see that at https://en.wikipedia.org/wiki/Accelerator_table though it seems to be a Microsoft term for basic shortcut key handling. > It is useful > if sparsely used combinations get new meaning, but might also > be abused to prevent the user from saving copyrighted data to > her/his hard drive. I am not sure about this as an effective mechanism wrt copyright. Most of the actions of the containing window can also be carried out using the mouse. There seem to be at least two problems with letting contained apps see things like Alt+key combinations: 1. Writers of contained web apps get carried away (they do) and redefine keys that the user might want not to be overridden - such as Alt+F. 2. Even if such app writers were to stay away from key combinations which have a known meaning to the browser they may still fall foul of the app being run by someone with another language. For example, Alt+H might bring down the Help menu in English but H does not appear in the Spanish word for Help which, I think, is Ayuda. Perhaps Alt should be reserved for the browser (if web browsing) or the window (if running a normal app in its own window). Perhaps apps in browsers could be allowed to use Control for keystroke handling. Maybe that's too simple but it would make it clear to the user how to access each set of functions: Alt for the browser, Control for the app in the browser. ISTM better than using some Alt keys for the browser and other Alt keys for the app. James
[toc] | [prev] | [next] | [standalone]
| From | Bernhard Schornak <schornak@web.de> |
|---|---|
| Date | 2015-10-05 17:38 +0200 |
| Message-ID | <muu5eh$1s2$1@dont-email.me> |
| In reply to | #8866 |
James Harris wrote:
> On 02/10/2015 19:43, Bernhard Schornak wrote:
>> James Harris wrote:
>>
>>> Other examples are viewing Youtube videos or reading Yahoo mail in a
>>> browser. Such sites can prevent
>>> a user typing Alt+F from getting the File menu and, instead, interpret
>>> such keystrokes in the web
>>> page. That's a similar problem to the one mentioned above.
>>
>> The underlying mechanism is called "accellerator table". Each
>> GUI program can re-define keystrokes (incl. combinations with
>> ALT, CONTROL, SHIFT) by adding an ACCELLERATORS statement and
>> the key definitions in its resource file (*.rc).
>
> I see that at
>
> https://en.wikipedia.org/wiki/Accelerator_table
>
> though it seems to be a Microsoft term for basic shortcut key handling.
Accellerators are part of the message subsystem. You have to
register your accellerator table (LdAccel() is a wrapper for
this task):
movq %rbp, %rcx # RCX = Hinstance
movl $0x1080, %edx # RDX = ID
call _LdAccel
testq %rax, %rax # error?
je 1f
movq %rax, %rbx # RBX = Haccel
After registering, the keys assigned to message IDs (similar
to the IDs assigned to GUI items like buttons or checkboxes)
trigger a message with the assigned ID. TrAccel() is another
wrapper calling the API function responsible for translation
from keystrokes to message IDs:
leaq 0x80(%rsp), %rcx # RCX = EA MSG
xorl %edx, %edx # all windows
xorl %r8d, %r8d # NULL
xorl %r9d, %r9d # NULL
0:call _GetMsg
testl %eax, %eax # WM_QUIT?
je 1f
incl %eax # shorter than cmp $0xFFFFFFFF,%eax
je 0b
movq %rcx, %r8 # R08 = EA MSG
movq %rbx, %rdx # RDX = Haccel
movq %rdi, %rcx # RCX = HWND
call _TrAccel
leaq 0x80(%rsp), %rcx # RCX = EA MSG
xorl %edx, %edx # all windows
xorl %r8d, %r8d # NULL
xorl %r9d, %r9d # NULL
call _TrnsMsg
call _DispMsg
jmp 0b
1:... # exit procedure
GetMsg (GetMessageA), TrnsMsg (TranslateMessage) and DispMsg
(DispatchMessage) are wrappers provided by my libraries...
>> It is useful
>> if sparsely used combinations get new meaning, but might also
>> be abused to prevent the user from saving copyrighted data to
>> her/his hard drive.
>
> I am not sure about this as an effective mechanism wrt copyright. Most of the actions of the
> containing window can also be carried out using the mouse. There seem to be at least two problems
> with letting contained apps see things like Alt+key combinations:
>
> 1. Writers of contained web apps get carried away (they do) and redefine keys that the user might
> want not to be overridden - such as Alt+F.
>
> 2. Even if such app writers were to stay away from key combinations which have a known meaning to
> the browser they may still fall foul of the app being run by someone with another language. For
> example, Alt+H might bring down the Help menu in English but H does not appear in the Spanish word
> for Help which, I think, is Ayuda.
>
> Perhaps Alt should be reserved for the browser (if web browsing) or the window (if running a normal
> app in its own window).
>
> Perhaps apps in browsers could be allowed to use Control for keystroke handling.
>
> Maybe that's too simple but it would make it clear to the user how to access each set of functions:
> Alt for the browser, Control for the app in the browser. ISTM better than using some Alt keys for
> the browser and other Alt keys for the app.
For OS/2, IBM introduced CUA ("common user access"), a bunch
of rules, which key combinations should be assigned to which
actions, e.g.: F1 = help, F3 = exit, and so on. The big idea
behind CUA was to establish a set of common keys to simplify
the handling of GUI applications.
https://en.wikipedia.org/wiki/IBM_Common_User_Access
When OS/2 disappeared, everything got lost, and a good idea
became history. Nowadays, we have to live with *bazillions*
of different wheels...
Nevertheless, accellerators are a mighty tool to prevent the
user from copying restricted material - a mouse click can be
"caught" as easy as a keystroke, and application programmers
can use hooks to catch *any* unwanted action (whether it was
typed in or clicked on does not matter).
Greetings from Augsburg
Bernhard Schornak
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Date | 2015-10-02 17:17 -0400 |
| Message-ID | <op.x5wde9jfyfako5@localhost> |
| In reply to | #8862 |
On Fri, 02 Oct 2015 06:42:34 -0400, James Harris <james.harris.1@gmail.com> wrote: > Any of you guys come up with a good way to handle keystrokes in a UI > when multiple elements of that UI may be 'interested' in receiving them? I'm wondering when that would occur. AIUI, usually one app or window at a time has focus for the keyboard which is selected via mouse or the tab key, etc. > If you have not come up with your own idea are you aware of any good > standards or recommendations? No, but I will B.S. with you on the topic. Some C.S. terminology comes to mind: preemptive multitasking cooperative multitasking consumer-producer problem polling > I say "good" above because AFAICS even popular implementations don't > necessarily get it right. For example, with some apps under Windows > pressing Alt and releasing it highlights the first drop-down menu item - > usually File. If you then press the Windows key (the key based on > Control+Esc) it may seem to be inhibited; instead of opening the Windows > Start menu nothing happens. IMO the windowing system should always > intercept keys like that one and Alt+Tab. Similar issues exist in Linux, e.g., Notepad won't drop down the first menu by pressing the ALT key. You must press ALT-F etc or mouse click a menu. ALT-G ... ALT-R ... ALT-D ... Argh! Where is ALT-F? ... The ALT key is in different position on every keyboard and not easy to find or type either. Ok. Thumb the left ALT key and hunt-and-peck the F with my other hand. Sigh, 15 seconds later, menu ... That's from someone who can (supposedly) type well. A gamer would probably map ALT-F to one of their mouse buttons. Also, with Windows, I was used to just moving a mouse over a Window or hover for it to become the active window for the keyboard. However, with Linux I keep typing into the wrong window, app, or terminal, because I must click the window to select it. I suspect the first is an app coding issue and the second is a coding issue with the user interface. > I just tried the above test on a few application windows. Notably, the > problem exists in this PC's (Win7) version of Task Manager and Notepad > but not Thunderbird. With the latter, even if the File menu is > highlighted (as described above) the Windows key is still obeyed by the > Windows GUI shell. IMO that is better. But the difference in effects is > obviously an inconsistency. So, is this a gui messaging problem or a software app issue? > It is also indicative of what may be happening. It seems that keystrokes > (all keystrokes?) are delivered first to the app window or the focussed > widget and that the OS windowing system only gets to see those that the > widget and the app pass along. ISTM that that's a bad idea as it allows > such keys to be captured by the app. A poorly or maliciously written app > could cause them to be ignored or, worse, perhaps choose to do things > which look right but are not as expected or do something devious in the > background (e.g. keystroke logging). So, you'd recommend doing what? Split the keyboard stream into visible characters plus space which the app could use directly, and keyboard sequences converted to window messages by the gui? > To confirm that interpretation of events, note this comment from > Microsoft: "If your window procedure must process a system keystroke > message, make sure that after processing the message the procedure > passes it to the DefWindowProc function. Otherwise, all system > operations involving the ALT key will be disabled whenever the window > has the keyboard focus. That is, the user won't be able to access the > window's menus or System menu, or use the ALT+ESC or ALT+TAB key > combination to activate a different window." > > That's not good. The quote is from > > [link] So, you're thinking about the reverse. I.e., a broadcast message for the ALT key to all open windows but then only the active focus window should take action for the broadcast. That would probably require splitting the keyboard stream into text and non-text. I doubt you want to pass text to all windows as that would slow things. > Other examples are viewing Youtube videos or reading Yahoo mail in a > browser. Such sites can prevent a user typing Alt+F from getting the > File menu and, instead, interpret such keystrokes in the web page. > That's a similar problem to the one mentioned above. As you may recall, I believe in TUC, total user control. IMO, preventing the user from doing what they want violates TUC. One reason I believe in TUC is because of the menu items being selectively enabled and disabled in gui apps. Many years ago, someone made a coding mistake on the Apple Macintoshes. Instead of explicitly setting a bit to enable the menu item and explicitly clearing the same bit to disable the menu item, they toggled the state of the menu item. Unfortunately, sometimes the state would be or become reversed somehow. That meant I couldn't select the menu item when needed. So, I don't care for paternalistic behavior from the OS or apps. I want them to do exactly what I "tell" them to do, when I "tell" them, and nothing more, nothing delayed. I don't care that the OS is in the middle of copying 100GB worth of files. I said "cancel". I don't want to "wait"... I.e., don't disable or enable any menu items for me. Make sure all menu items are always present, not hidden, and enabled. Let me select it. If the app can't perform the operation at that point, give me a warning and an understandable reason as to why. Over the years, Windows has become better at not auto-hiding and not auto-enabling so much, but M$ still periodically slips up and reverts to the minimalist, lets-hide-everything-so-no-one-can-ever-find-it menatlity so that their user complaints go away. "The less they know about, the less they can complain about being broken! He he. They can't even find it to complain about it!" > ISTM that there has to be a better design than that. Hence this post. ... > To illustrate potential options: Imagine a chain of UI elements from the > widget which currently has focus up through each of its parents in turn > to its window and then up again to the windowing system shell. If > keystrokes are passed to the lowest level (the focussed widget) first > then we can get the problems above. If they are passed in the other > direction, though, would that be better? Or would it mean that things > like Control+C would be picked up as a Copy command even in windows like > a terminal where it should generate an ASCII 3? Obviously, there needs to be a method to select or filter which window, app, or widget receives the command sequence. It can be viewed as a form of "pre-processing," as you're describing, because that goes directly to where the sequence is needed and only goes to other windows or widgets or apps if the focused app doesn't need it. Or, it can be viewed as a form of "post-processing," such as every app, window, or widget receiving the message or sequence and those which don't need it selectively rejecting it, i.e., not focused. You're familiar with ungetc(), yes? I.e., the focused app/widget/window could poll the keyboard stream while the non-focused ones don't. If the focused app doesn't use the sequence, it could push it back into the input stream, temporarily yield focus and wait for some other task to take the sequence from the stream. This would cascade down through the chain as far as is needed with the OS at the end of the chain. The OS would be required to grabs the sequence, if reached, even if unneeded. Once a task has popped the sequence, then the focus returns to the app which yielded. So, this could be thought of as a sequence of pop-accept-restore-focus or pop-reject-push-yield-focus. I.e., probably two stacks: stream and focus. > Some alternatives: > 1) pass keystroke info down instead of up, i.e. from the UI shell > down a step at a time until something absorbs the keystroke info > or we get to the focussed widget, > 2) pass keystroke info down then back up - i.e. where each UI > element gets two distinct chances to choose whether to absorb > it or not, > 3) let the windowing shell get first dibs for the really important > keys and then pass from the bottom up, etc. 4) broadcast to all and each either accepts or rejects, with only the focused widget/app/window accept 5) active or focused window polls, conditionally rejects to pass info up ... > In each case I am thinking that the first UI element which [has] an > 'interest' in the keystroke basically getting the first chance either > to absorb it or to ignore it. Even in a multi-tasking, multi-process OS, the user can only work on a single app at a time, but they can switch through many of them quickly as needed. So, there is only a single app/widget/window/menu which is active or has focus at any point in time. Personally, I would attempt to poll from the item granted the keyboard focus, with the mouse or tab key etc selecting a new focus for the keyboard. AISI, the problem with most of the solutions is that they pass around too much information or pass information between too many layers when that's not required. I.e., I'd probably also attempt to go for the one that minimized information passing (if it works), e.g., polling, pass-back if rejected. Rod Pemberton -- Just how many texting and calendar apps does humanity need? Just how many food articles from neurotic millenials do we need?
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2015-10-04 16:36 +0100 |
| Message-ID | <murgth$uhm$1@dont-email.me> |
| In reply to | #8864 |
On 02/10/2015 22:17, Rod Pemberton wrote: > On Fri, 02 Oct 2015 06:42:34 -0400, James Harris > <james.harris.1@gmail.com> wrote: > >> Any of you guys come up with a good way to handle keystrokes in a UI >> when multiple elements of that UI may be 'interested' in receiving them? > > I'm wondering when that would occur. AIUI, usually one app or window > at a time has focus for the keyboard which is selected via mouse or > the tab key, etc. That's true but even when a widget has focus there are some keys or key combinations which should be handled by something else. As an example of that, say you are typing into a text-entry field. You might want: * V and Shift+V to be passed to the text-entry field * Control-V to trigger a Paste operation * Alt+V to be passed to the window to pull down the View menu * Windows+V to start an app That requires the different key combinations to be handled in different places, not just the widget which has focus. The component which receives the keystroke event will differ depending on what the event is. I was asking how a UI should control which events go to which components. >> If you have not come up with your own idea are you aware of any good >> standards or recommendations? ... > Also, with Windows, I was used to just moving a mouse over a Window or > hover for it to become the active window for the keyboard. However, > with Linux I keep typing into the wrong window, app, or terminal, > because I must click the window to select it. You mean the other way round? AIUI Windows uses Click to select a window whereas X allows you to chose whether to Click or just to Move to that window. That said, I have seen Windows interpret the mouse scroll wheel strangely - such as scrolling a background window rather than the one on top with the focus. ... >> I just tried the above test on a few application windows. Notably, the >> problem exists in this PC's (Win7) version of Task Manager and Notepad >> but not Thunderbird. With the latter, even if the File menu is >> highlighted (as described above) the Windows key is still obeyed by the >> Windows GUI shell. IMO that is better. But the difference in effects is >> obviously an inconsistency. > > So, is this a gui messaging problem or a software app issue? Maybe both. I guess I was asking if and how a GUI's messaging should be set up so that an app could not take over keys that the user might want to use for the GUI's windows. >> It is also indicative of what may be happening. It seems that keystrokes >> (all keystrokes?) are delivered first to the app window or the focussed >> widget and that the OS windowing system only gets to see those that the >> widget and the app pass along. ISTM that that's a bad idea as it allows >> such keys to be captured by the app. A poorly or maliciously written app >> could cause them to be ignored or, worse, perhaps choose to do things >> which look right but are not as expected or do something devious in the >> background (e.g. keystroke logging). > > So, you'd recommend doing what? Split the keyboard stream into visible > characters plus space which the app could use directly, and keyboard > sequences converted to window messages by the gui? I don't know what the best approach is - hence the question. It seems that the traditional approach is to allow widgets to receive any and all keys if they want to. That doesn't seem right and causes the problems mentioned initially. >> To confirm that interpretation of events, note this comment from >> Microsoft: "If your window procedure must process a system keystroke >> message, make sure that after processing the message the procedure >> passes it to the DefWindowProc function. Otherwise, all system >> operations involving the ALT key will be disabled whenever the window >> has the keyboard focus. That is, the user won't be able to access the >> window's menus or System menu, or use the ALT+ESC or ALT+TAB key >> combination to activate a different window." >> >> That's not good. The quote is from >> >> [link] > > So, you're thinking about the reverse. I.e., a broadcast message for > the ALT key to all open windows but then only the active focus window > should take action for the broadcast. That would probably require > splitting the keyboard stream into text and non-text. I doubt you > want to pass text to all windows as that would slow things. No, I am not suggesting a broadcast. Imagine that Alf+F pulled down three of four file menus at the same time.... Not good! ... >> To illustrate potential options: Imagine a chain of UI elements from the >> widget which currently has focus up through each of its parents in turn >> to its window and then up again to the windowing system shell. If >> keystrokes are passed to the lowest level (the focussed widget) first >> then we can get the problems above. If they are passed in the other >> direction, though, would that be better? Or would it mean that things >> like Control+C would be picked up as a Copy command even in windows like >> a terminal where it should generate an ASCII 3? > > Obviously, there needs to be a method to select or filter which window, > app, or widget receives the command sequence. It can be viewed as a > form of "pre-processing," as you're describing, because that goes > directly to where the sequence is needed and only goes to other windows > or widgets or apps if the focused app doesn't need it. Or, it can be > viewed as a form of "post-processing," such as every app, window, or > widget receiving the message or sequence and those which don't need > it selectively rejecting it, i.e., not focused. Yes. > You're familiar with ungetc(), yes? I.e., the focused app/widget/window > could poll the keyboard stream while the non-focused ones don't. If the > focused app doesn't use the sequence, it could push it back into the input > stream, temporarily yield focus and wait for some other task to take the > sequence from the stream. This would cascade down through the chain as > far as is needed with the OS at the end of the chain. The OS would be > required to grabs the sequence, if reached, even if unneeded. Once a > task has popped the sequence, then the focus returns to the app which > yielded. So, this could be thought of as a sequence of > pop-accept-restore-focus or pop-reject-push-yield-focus. I.e., probably > two stacks: stream and focus. I think the existing systems I mentioned work in that sort of way, i.e. the widget with focus can register to receive all events and, if it receives an event it is not interested in, it can 'unget' the event allowing it to be passed 'up' to a parent. Unfortunately, that allows apps to take over keys that would appear to be for window control. >> Some alternatives: >> 1) pass keystroke info down instead of up, i.e. from the UI shell >> down a step at a time until something absorbs the keystroke info >> or we get to the focussed widget, >> 2) pass keystroke info down then back up - i.e. where each UI >> element gets two distinct chances to choose whether to absorb >> it or not, >> 3) let the windowing shell get first dibs for the really important >> keys and then pass from the bottom up, etc. > > 4) broadcast to all and each either accepts or rejects, with only the > focused widget/app/window accept > 5) active or focused window polls, conditionally rejects to pass info up OK. What do you mean by polling. >> In each case I am thinking that the first UI element which [has] an >> 'interest' in the keystroke basically getting the first chance either >> to absorb it or to ignore it. > > Even in a multi-tasking, multi-process OS, the user can only work on > a single app at a time, but they can switch through many of them > quickly as needed. So, there is only a single app/widget/window/menu > which is active or has focus at any point in time. Not sure if it's what you mean but whichever widget has the focus sits in a window, and the window exists in a 'desktop'. Any of those three might want to process a certain event. (Widgets may also exist within a container and the container within another container and that within a window - so the chain up may have more than just the three levels widget, window, and desktop.) > Personally, > I would attempt to poll from the item granted the keyboard focus, with > the mouse or tab key etc selecting a new focus for the keyboard. Sorry, I don't understand what you mean there. > AISI, the problem with most of the solutions is that they pass around > too much information or pass information between too many layers when > that's not required. I.e., I'd probably also attempt to go for the > one that minimized information passing (if it works), e.g., polling, > pass-back if rejected. OK. Would that stop widgets from trapping things like Alt+Tab? James
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Date | 2015-10-04 21:27 -0400 |
| Message-ID | <op.x50ebanoyfako5@localhost> |
| In reply to | #8867 |
On Sun, 04 Oct 2015 11:36:08 -0400, James Harris <james.harris.1@gmail.com> wrote: > On 02/10/2015 22:17, Rod Pemberton wrote: >> On Fri, 02 Oct 2015 06:42:34 -0400, James Harris >> <james.harris.1@gmail.com> wrote: >> >>> Any of you guys come up with a good way to handle keystrokes in a UI >>> when multiple elements of that UI may be 'interested' in receiving them? >> >> I'm wondering when that would occur. AIUI, usually one app or window >> at a time has focus for the keyboard which is selected via mouse or >> the tab key, etc. > > That's true but even when a widget has focus there are some keys or key > combinations which should be handled by something else. > > As an example of that, say you are typing into a text-entry field. You > might want: > > * V and Shift+V to be passed to the text-entry field > * Control-V to trigger a Paste operation > * Alt+V to be passed to the window to pull down the View menu > * Windows+V to start an app > > That requires the different key combinations to be handled in different > places, not just the widget which has focus. The component which > receives the keystroke event will differ depending on what the event is. > I was asking how a UI should control which events go to which components. Well, I suggested a few later in the post. Even here, I think the accept or reject, and pass-back upon reject method would work. Of course, the widget loses focus to it's text field when it's text field is activated. I.e., the text-entry field has the focus. It can accept V and Shift-V. It rejects Control-V, Alt+V, Windows+V as unusable and passes back up the chain. >> Also, with Windows, I was used to just moving a mouse over a Window or >> hover for it to become the active window for the keyboard. However, >> with Linux I keep typing into the wrong window, app, or terminal, >> because I must click the window to select it. > > You mean the other way round? AIUI Windows uses Click to select a window > whereas X allows you to chose whether to Click or just to Move to that > window. No. It may have been a system tweak for Windows 98/SE. For XFCE on Linux, I currently have to click everything. >>> I just tried the above test on a few application windows. Notably, the >>> problem exists in this PC's (Win7) version of Task Manager and Notepad >>> but not Thunderbird. With the latter, even if the File menu is >>> highlighted (as described above) the Windows key is still obeyed by the >>> Windows GUI shell. IMO that is better. But the difference in effects is >>> obviously an inconsistency. >> >> So, is this a gui messaging problem or a software app issue? > > Maybe both. I guess I was asking if and how a GUI's messaging should be > set up so that an app could not take over keys that the user might want > to use for the GUI's windows. Perhaps, don't let the app have any access. I.e., a text field is a part of the OS, a widget is a part of the OS, a menu is a part of the OS, etc. If the app can only call a function for each of the menuing elements, then the OS keeps control. You're a strong propoent of modularity anyway. So, this should fit right in with your values. :) >>> To confirm that interpretation of events, note this comment from >>> Microsoft: "If your window procedure must process a system keystroke >>> message, make sure that after processing the message the procedure >>> passes it to the DefWindowProc function. Otherwise, all system >>> operations involving the ALT key will be disabled whenever the window >>> has the keyboard focus. That is, the user won't be able to access the >>> window's menus or System menu, or use the ALT+ESC or ALT+TAB key >>> combination to activate a different window." >>> >>> That's not good. The quote is from >>> >>> [link] >> >> So, you're thinking about the reverse. I.e., a broadcast message for >> the ALT key to all open windows but then only the active focus window >> should take action for the broadcast. That would probably require >> splitting the keyboard stream into text and non-text. I doubt you >> want to pass text to all windows as that would slow things. > > No, I am not suggesting a broadcast. Imagine that Alf+F pulled down > three of four file menus at the same time.... Not good! Well, only the active or focused menu would use that info. Yes? The non-active menus would reject it because they're not active, i.e., the info isn't for them. >>> Some alternatives: >>> 1) pass keystroke info down instead of up, i.e. from the UI shell >>> down a step at a time until something absorbs the keystroke info >>> or we get to the focussed widget, >>> 2) pass keystroke info down then back up - i.e. where each UI >>> element gets two distinct chances to choose whether to absorb >>> it or not, >>> 3) let the windowing shell get first dibs for the really important >>> keys and then pass from the bottom up, etc. >> >> 4) broadcast to all and each either accepts or rejects, with only the >> focused widget/app/window accept >> 5) active or focused window polls, conditionally rejects to pass info up > > OK. What do you mean by polling. Let's say you have preemptive multi-tasking. Microprocessor time or clocks is being divided amongst various pieces of code which are executing. The OS sets a variable to the process ID for the current process, where the current process is the focused text-field, menu, tab, window, etc. The active item - the one receiving processor time - has a loop which checks if the focused ID is the same as it's ID. If it is, then it can use the keyboard stream. If not, then it can't. If it can and doesn't want the info, it passes the info back so something else can use it when it receives some processing time. >>> In each case I am thinking that the first UI element which [has] an >>> 'interest' in the keystroke basically getting the first chance either >>> to absorb it or to ignore it. >> >> Even in a multi-tasking, multi-process OS, the user can only work on >> a single app at a time, but they can switch through many of them >> quickly as needed. So, there is only a single app/widget/window/menu >> which is active or has focus at any point in time. > > Not sure if it's what you mean but whichever widget has the focus sits > in a window, and the window exists in a 'desktop'. Any of those three > might want to process a certain event. (Widgets may also exist within a > container and the container within another container and that within a > window - so the chain up may have more than just the three levels > widget, window, and desktop.) Well, all of of them can't handle ALT-F. Can they? ... AFAIK, only one of them can be allowed to handle ALT-F on a "permanent" basis. So, the info is either filtered out or rejected by some of them. AISI, it's just a matter of whether you want the higher-level items to obtain the info first, or whether that info goes to the focused item and it rejects what it doesn't need. When multiple layers need to handle ALT-F, usually there is some sort of escape sequence to allow the layer to receive an ALT-F, e.g., VI editor for CTRL-M you must type CTRL-V then M. >> Personally, I would attempt to poll from the item granted the >> keyboard focus, with the mouse or tab key etc selecting a new >> focus for the keyboard. > > Sorry, I don't understand what you mean there. E.g., your text-field. When you're typing into it, it has the focus. It's receiving the keyboard input. It gained the focus by tab-ing to it or by mouse clicking upon it. The text field could have a polling loop to check to see if it's the item granted focus. If it's not active, then it shouldn't attempt to use the keyboard stream. If you're using preemptive multitasking, the code for your text-field, menu, widget, etc will all be receiving processor time in a round-robbin or time slice method, which they must yield when they're not active. Or, you would need to have a scheduler which caused everything which isn't active to not receive any processing time until activated. Semi-permanent "sleep" would, of course, prohibit that code from checking on various events, timers, counters, etc. So, AISI, everything which is executing, must get some processor time, even if they mostly yield their time. >> AISI, the problem with most of the solutions is that they pass around >> too much information or pass information between too many layers when >> that's not required. I.e., I'd probably also attempt to go for the >> one that minimized information passing (if it works), e.g., polling, >> pass-back if rejected. > > OK. Would that stop widgets from trapping things like Alt+Tab? Rejection. If a programmer can inject their own code here, then they could code whatever they want and trap them. If the parts and pieces of all widgets, menus, apps etc which access keyboard stream are under the OS control, then they couldn't, e.g., when the text-field is not user programmable but a system function which was programmed to reject Alt+Tab. Rod Pemberton -- Just how many texting and calendar apps does humanity need? Just how many food articles from neurotic millenials do we need?
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2015-10-05 15:01 +0100 |
| Message-ID | <mutvnl$9h9$2@dont-email.me> |
| In reply to | #8870 |
On 05/10/2015 02:27, Rod Pemberton wrote:
> On Sun, 04 Oct 2015 11:36:08 -0400, James Harris
> <james.harris.1@gmail.com> wrote:
>
>> On 02/10/2015 22:17, Rod Pemberton wrote:
...
>> say you are typing into a text-entry field. You
>> might want:
>>
>> * V and Shift+V to be passed to the text-entry field
>> * Control-V to trigger a Paste operation
>> * Alt+V to be passed to the window to pull down the View menu
>> * Windows+V to start an app
>>
>> That requires the different key combinations to be handled in different
>> places, not just the widget which has focus. The component which
>> receives the keystroke event will differ depending on what the event is.
>> I was asking how a UI should control which events go to which components.
>
> Well, I suggested a few later in the post. Even here, I think the accept
> or reject, and pass-back upon reject method would work. Of course, the
> widget loses focus to it's text field when it's text field is activated.
> I.e., the text-entry field has the focus. It can accept V and Shift-V.
> It rejects Control-V, Alt+V, Windows+V as unusable and passes back up
> the chain.
It would work but, unfortunately, it leads to the problems I have been
speaking about where keyboard navigation controls can vary depending on
which window has focus. As I just wrote to Wolfgang that has the
potential to be very confusing for a user of the UI as the apps behave
inconsistently.
This may be heading towards something like the following.
* Certain specific controls being defined for the UI itself: switch
application, launch a new app, close a window etc. Perhaps specific key
combinations. Top priority. These keystrokes reserved for the UI.
* A certain type of control being used for the framework of a window:
pull down menus, pop-up menus, move the focus etc. Perhaps Alt+key, Tab,
Shift+Tab, etc.
* Another certain type of control being passed to the widget or
application running in a window. Perhaps all the rest.
A scheme like that would give apps plenty of scope for shortcut keys if
they wanted them but also give a user a consistent way to control the UI
and elements therein.
I don't know if that can be done completely, however. For example, if a
browser is passed the Alt+key keystrokes for its own menus then AFAICS
there is nothing to prevent it passing those on to JavaScript apps that
run in the browser's windows. Some web-based email clients work that
way: with the browser's permission or complicity they take over some or
all Alt+key combinations to control navigation within the email system.
That means that those keys no longer control the browser.
Such an embedded app could take over something like Alt+T so that,
instead of it pulling down the browser's Tools menu, it sends the
current message the the Trash. Yuck! That's especially bad when the
browser shows its Tools menu with T underlined. The underline is
normally taken as a hint that that's what Alt+T leads to but the
embedded app would have been allowed to take over that keystroke and
thus cause a disconnect between what the user sees and what happens.
>>> Also, with Windows, I was used to just moving a mouse over a Window or
>>> hover for it to become the active window for the keyboard. However,
>>> with Linux I keep typing into the wrong window, app, or terminal,
>>> because I must click the window to select it.
>>
>> You mean the other way round? AIUI Windows uses Click to select a window
>> whereas X allows you to chose whether to Click or just to Move to that
>> window.
>
> No.
>
> It may have been a system tweak for Windows 98/SE. For XFCE on Linux,
> I currently have to click everything.
Is there no option in XFCE to change the behaviour to what you prefer?
...
>> I guess I was asking if and how a GUI's messaging should be
>> set up so that an app could not take over keys that the user might want
>> to use for the GUI's windows.
>
> Perhaps, don't let the app have any access. I.e., a text field is a
> part of the OS, a widget is a part of the OS, a menu is a part of the
> OS, etc. If the app can only call a function for each of the menuing
> elements, then the OS keeps control. You're a strong propoent of
> modularity anyway. So, this should fit right in with your values. :)
That sounds good but is it possible for the OS to keep control? Take the
example above. If the OS launches a web browser and passes it things
like Alt+ keystrokes for its own menus how can it prevent the browser
then passing those keystrokes to an app the browser is running?
...
>>> So, you're thinking about the reverse. I.e., a broadcast message for
>>> the ALT key to all open windows but then only the active focus window
>>> should take action for the broadcast. That would probably require
>>> splitting the keyboard stream into text and non-text. I doubt you
>>> want to pass text to all windows as that would slow things.
>>
>> No, I am not suggesting a broadcast. Imagine that Alf+F pulled down
>> three of four file menus at the same time.... Not good!
>
> Well, only the active or focused menu would use that info. Yes?
> The non-active menus would reject it because they're not active,
> i.e., the info isn't for them.
It may be best for them simply not to receive it. Maybe I am missing
your point but I cannot see any good reason to pass a key combination to
elements which do not have focus - and then expect them to reject it.
...
> When multiple layers need to handle ALT-F, usually there is some sort
> of escape sequence to allow the layer to receive an ALT-F, e.g., VI
> editor for CTRL-M you must type CTRL-V then M.
Yes, that is an approach taken by a number of systems: reserve a
keystroke but if the user really wants to send it to a child then allow
that too. That may be less convenient for the app but it still allows
the control and keeps the UI more convenient for the user.
Of course, apps can still be controlled by a mouse. None of this
discussion affects that so none of that control is lost.
>>> Personally, I would attempt to poll from the item granted the
>>> keyboard focus, with the mouse or tab key etc selecting a new
>>> focus for the keyboard.
>>
>> Sorry, I don't understand what you mean there.
>
> E.g., your text-field. When you're typing into it, it has the focus.
> It's receiving the keyboard input. It gained the focus by tab-ing to
> it or by mouse clicking upon it. The text field could have a polling
> loop to check to see if it's the item granted focus. If it's not
> active, then it shouldn't attempt to use the keyboard stream. If
> you're using preemptive multitasking, the code for your text-field,
> menu, widget, etc will all be receiving processor time in a round-robbin
> or time slice method, which they must yield when they're not active.
>
> Or, you would need to have a scheduler which caused everything which
> isn't active to not receive any processing time until activated.
> Semi-permanent "sleep" would, of course, prohibit that code from
> checking on various events, timers, counters, etc.
I think an element can be "woken up" when an event occurs so there's no
need for polling.
Event-driven apps such as UIs often have a main event loop which is a
single thread which operates as follows.
loop
wait for next input event and assign to E
switch (E)
case 0:
process type 0
break
case 1:
process type 1
break
etc.
The processing cases would really be formed dynamically rather than the
static choices shown above but they could refer to different event types
and message destinations.
> So, AISI,
> everything which is executing, must get some processor time, even
> if they mostly yield their time.
As I say, with event-driven programs there's no need to poll. Such
programs normally sit quietly in the event loop waiting until something
happens.
>>> AISI, the problem with most of the solutions is that they pass around
>>> too much information or pass information between too many layers when
>>> that's not required. I.e., I'd probably also attempt to go for the
>>> one that minimized information passing (if it works), e.g., polling,
>>> pass-back if rejected.
>>
>> OK. Would that stop widgets from trapping things like Alt+Tab?
>
> Rejection.
>
> If a programmer can inject their own code here, then they could
> code whatever they want and trap them. If the parts and pieces
> of all widgets, menus, apps etc which access keyboard stream are
> under the OS control, then they couldn't, e.g., when the text-field
> is not user programmable but a system function which was programmed
> to reject Alt+Tab.
That is possibly written with your broadcast and polling model in mind
which as mentioned I don't believe is necessary. It may be better not to
pass the Alt+Tab to a window in the first place. The UI can at least
control what messages it sends to the windows it is hosting.
James
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Date | 2015-10-05 21:57 -0400 |
| Message-ID | <op.x52adnz7yfako5@localhost> |
| In reply to | #8872 |
On Mon, 05 Oct 2015 10:01:16 -0400, James Harris <james.harris.1@gmail.com> wrote:
> On 05/10/2015 02:27, Rod Pemberton wrote:
>> On Sun, 04 Oct 2015 11:36:08 -0400, James Harris
>> <james.harris.1@gmail.com> wrote:
>>> On 02/10/2015 22:17, Rod Pemberton wrote:
>>> say you are typing into a text-entry field. You
>>> might want:
>>>
>>> * V and Shift+V to be passed to the text-entry field
>>> * Control-V to trigger a Paste operation
>>> * Alt+V to be passed to the window to pull down the View menu
>>> * Windows+V to start an app
>>>
>>> That requires the different key combinations to be handled in different
>>> places, not just the widget which has focus. The component which
>>> receives the keystroke event will differ depending on what the event is.
>>> I was asking how a UI should control which events go to which components.
>>
>> Well, I suggested a few later in the post. Even here, I think the accept
>> or reject, and pass-back upon reject method would work. Of course, the
>> widget loses focus to it's text field when it's text field is activated.
>> I.e., the text-entry field has the focus. It can accept V and Shift-V.
>> It rejects Control-V, Alt+V, Windows+V as unusable and passes back up
>> the chain.
>
> It would work but, unfortunately, it leads to the problems I have been
> speaking about where keyboard navigation controls can vary depending on
> which window has focus. As I just wrote to Wolfgang that has the
> potential to be very confusing for a user of the UI as the apps behave
> inconsistently.
>
> This may be heading towards something like the following.
>
> * Certain specific controls being defined for the UI itself: switch
> application, launch a new app, close a window etc. Perhaps specific key
> combinations. Top priority. These keystrokes reserved for the UI.
>
> * A certain type of control being used for the framework of a window:
> pull down menus, pop-up menus, move the focus etc. Perhaps Alt+key, Tab,
> Shift+Tab, etc.
>
> * Another certain type of control being passed to the widget or
> application running in a window. Perhaps all the rest.
>
> A scheme like that would give apps plenty of scope for shortcut keys if
> they wanted them but also give a user a consistent way to control the UI
> and elements therein.
>
> I don't know if that can be done completely, however. For example, if a
> browser is passed the Alt+key keystrokes for its own menus then AFAICS
> there is nothing to prevent it passing those on to JavaScript apps that
> run in the browser's windows. Some web-based email clients work that
> way: with the browser's permission or complicity they take over some or
> all Alt+key combinations to control navigation within the email system.
> That means that those keys no longer control the browser.
>
> Such an embedded app could take over something like Alt+T so that,
> instead of it pulling down the browser's Tools menu, it sends the
> current message the the Trash. Yuck! That's especially bad when the
> browser shows its Tools menu with T underlined. The underline is
> normally taken as a hint that that's what Alt+T leads to but the
> embedded app would have been allowed to take over that keystroke and
> thus cause a disconnect between what the user sees and what happens.
Isn't all of this just an issue of how you want to split the keyboard's
stream or filter it?
I.e., send it forward and filter as it goes, send it backward and filter
as it goes, send it directly to the appropriate object or item, allow
multiple objects to access or not, etc.
>>>> Also, with Windows, I was used to just moving a mouse over a Window or
>>>> hover for it to become the active window for the keyboard. However,
>>>> with Linux I keep typing into the wrong window, app, or terminal,
>>>> because I must click the window to select it.
>>>
>>> You mean the other way round? AIUI Windows uses Click to select a window
>>> whereas X allows you to chose whether to Click or just to Move to that
>>> window.
>>
>> No.
>>
>> It may have been a system tweak for Windows 98/SE. For XFCE on Linux,
>> I currently have to click everything.
>
> Is there no option in XFCE to change the behaviour to what you prefer?
>
I don't know yet and have yet to look. I've only been using Linux
consistently for a year ... Or, is it two, now?
<OT>
I spent much of Sunday trying to find out why after updating Firefox to
the current version, it would halt the video portion of Adobe Flash videos
after a few seconds, unless the mouse was being moved constantly. I never
found an answer for that. It seems to affect many people with many different
versions of Firefox. Next, I spent more time trying to get html5 video
working with Chrome and Firefox. I thought I was missing a video driver
or the browsers didn't support something or newer protocols weren't enabled
in their settings. Html5 video would play way too fast, like on fast forward,
and without any sound. The problem was that the alsa and pulse audio drivers
needed updating. The clue was found on some random website via Google Search
in a post by some guy saying his too fast, soundless html5 videos played at
normal speed once he killed the pulse audio process.
However, after updating them, Linux wouldn't boot into the XFCE's GUI. It
complained of a missing library. So, I tracked that down and installed.
Then, it complained of another. Ad ifinitum. I began wondering how an
install managed to delete numerous library files without wiping out the
entire library directory. It turns out that the updated files installed
XFCE components for a more recent version of the OS which uses a different
XFCE build and many more libraries ... So, I had to uninstall all of that,
reinstall the base XFCE files for my version of the OS.
Once that was done, I couldn't get the updated version of Chrome to start.
Apparently, older versions of Chrome would work as both user and root, but
the newer version has some type of sandboxing which won't work if logged
in as root such as when installing Chrome and testing it out ... Apparently,
this was "lockout" mechanism for root was done intentionally by the Chrome
developers but without them telling anyone. Unbelievable. Everyone who knows
anything about OSes know that *everything* is supposed to run and function
as root. Otherwise, there is no point to having a root account. The user
account is supposed to be restricted for safety. I'm spewing many
derogatory words in my mind in the direction of Chrome developers right now.
A week or two ago it is was a Windows 7 corrupted component base store,
which is apparently impossible to fix without reinstalling the entire OS.
None of the half dozen M$ recommended fixes work, and one online util
only partly fixed the issue. This is the conclusion I came too after
spending a few days worth of time attempting to do so. So, it remains
corrupted.
Now, I need to figure out why my supposedly IPV6 capable Linux kernel
seems to have absolutely no IPV6 functionality and why the OS has
no IPV6 modules.
None of this includes my own attempted programming pursuits ...
<EOT>
>>> I guess I was asking if and how a GUI's messaging should be
>>> set up so that an app could not take over keys that the user might want
>>> to use for the GUI's windows.
>>
>> Perhaps, don't let the app have any access. I.e., a text field is a
>> part of the OS, a widget is a part of the OS, a menu is a part of the
>> OS, etc. If the app can only call a function for each of the menuing
>> elements, then the OS keeps control. You're a strong propoent of
>> modularity anyway. So, this should fit right in with your values. :)
>
> That sounds good but is it possible for the OS to keep control? Take the
> example above. If the OS launches a web browser and passes it things
> like Alt+ keystrokes for its own menus how can it prevent the browser
> then passing those keystrokes to an app the browser is running?
Does the OS control all the ways the "app the browser is running" can use
those keys? If yes, i.e., if the OS controls the input boxes/fields even
though the app is using them, then there is nothing more to do. If no,
then the stream would need to be filtered or split so that the "app the
browser is running" won't receive them.
>>>> So, you're thinking about the reverse. I.e., a broadcast message for
>>>> the ALT key to all open windows but then only the active focus window
>>>> should take action for the broadcast. That would probably require
>>>> splitting the keyboard stream into text and non-text. I doubt you
>>>> want to pass text to all windows as that would slow things.
>>>
>>> No, I am not suggesting a broadcast. Imagine that Alf+F pulled down
>>> three of four file menus at the same time.... Not good!
>>
>> Well, only the active or focused menu would use that info. Yes?
>> The non-active menus would reject it because they're not active,
>> i.e., the info isn't for them.
>
> It may be best for them simply not to receive it. Maybe I am missing
> your point but I cannot see any good reason to pass a key combination to
> elements which do not have focus - and then expect them to reject it.
Only one element has focus. So, if the element with focus receives the
entire keyboard stream, then Alt-V, used for it's parent window, say,
will be passed to it. It would need to reject it since it can't use it.
Of course, in the hierarchy or chain of items for that window, there
are other items inbetween the one with focus and the parent window.
So, the key sequence would be passed from child, back through other
parent/children, until it reached the parent window, where it could
be used. This was a pass back method, instead of pass forward, or
pass directly.
Of course, this more along the lines of an object-oriented design
where each element has code associated with it that operates
somewhat independently of each other. If an app is all inclusive,
then the app would control each menu, tab, sub-window etc from the
same code. So, the app would see everything in the text-field and
Alt-V type sequences. The app would then have to decide when to
and when not to filter.
>>>> Personally, I would attempt to poll from the item granted the
>>>> keyboard focus, with the mouse or tab key etc selecting a new
>>>> focus for the keyboard.
>>>
>>> Sorry, I don't understand what you mean there.
>>
>> E.g., your text-field. When you're typing into it, it has the focus.
>> It's receiving the keyboard input. It gained the focus by tab-ing to
>> it or by mouse clicking upon it. The text field could have a polling
>> loop to check to see if it's the item granted focus. If it's not
>> active, then it shouldn't attempt to use the keyboard stream. If
>> you're using preemptive multitasking, the code for your text-field,
>> menu, widget, etc will all be receiving processor time in a round-robbin
>> or time slice method, which they must yield when they're not active.
>>
>> Or, you would need to have a scheduler which caused everything which
>> isn't active to not receive any processing time until activated.
>> Semi-permanent "sleep" would, of course, prohibit that code from
>> checking on various events, timers, counters, etc.
>
> I think an element can be "woken up" when an event occurs so there's
> no need for polling.
Sure, but preemptive multitasking already "wakes up" each element
periodically in a round-robbin style fashion.
I.e., instead of an alarm clock waiting for a rooster to crow (event)
once in the morning, the alarm clock goes off every nine minutes due
to only the snooze button working.
If you aren't going to use preemptive multitasking, perhaps prefering
cooperative multitasking instead, then you could wait for the event.
> Event-driven apps such as UIs often have a main event loop which is a
> single thread which operates as follows.
>
> loop
> wait for next input event and assign to E
> switch (E)
> case 0:
> process type 0
> break
> case 1:
> process type 1
> break
>
> etc.
With an interrupt driven processor and preemptive multitasking, the
code doesn't need to wait to be notified of an event. It will find
out within a few milliseconds of being given execution control if
there is anything for it to do by simple polling the buffers for
the data streams. Although it could pause or yield etc to reduce
wasting processor cycles doing "nothing" except polling. The loop
simply needs to poll if there any data is present or not.
loop
check if there is input data
if (input data is available) then handle data
pause or yield
The x86 hardware interrupt routines for the keyboard or mouse
would fill a buffer, which each loop polls for the data, i.e.,
checks to see if any is present.
This would be like using CHECK KEYSTROKE Bios Int 16h, Ah=01h.
If there is no keystroke, the code can do something else or
or check again or wait or halt or yield etc. If there is a
keystroke, it would call GET KEYSTROKE Bios Int 16h, Ah=00h.
If you called GET KEYSTROKE without calling CHECK KEYSTROKE
first, GET KEYSTROKE will wait until there is a key to return,
i.e., this waits for an event before proceeding.
> > So, AISI,
>> everything which is executing, must get some processor time, even
>> if they mostly yield their time.
>
> As I say, with event-driven programs there's no need to poll. Such
> programs normally sit quietly in the event loop waiting until something
> happens.
As pointed out, with interrupt-driven hardware and preemptive
multitasking there's no need to wait for an event.
The interrupt routine isn't going to wake up the code and drive the
app's data input routine directly. It's going to stuff that data into
a buffer somewhere which is shared by the OS and the app.
Rod Pemberton
--
Just how many texting and calendar apps does humanity need?
Just how many food articles from neurotic millenials do we need?
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Date | 2015-10-26 04:35 -0400 |
| Subject | Re: halting Adobe Flash videos with Mozilla Firefox, was [Re: Flow of keystroke messages in a UI] |
| Message-ID | <op.x63t42sbyfako5@localhost> |
| In reply to | #8880 |
On Mon, 05 Oct 2015 21:57:13 -0400, Rod Pemberton <boo@fasdfrewar.cdm> wrote: > <OT> > I spent much of Sunday trying to find out why after updating Firefox to > the current version, it would halt the video portion of Adobe Flash videos > after a few seconds, unless the mouse was being moved constantly. I never > found an answer for that. It seems to affect many people with many different > versions of Firefox. Next, I spent more time trying to get html5 video > working with Chrome and Firefox. I thought I was missing a video driver > or the browsers didn't support something or newer protocols weren't enabled > in their settings. Html5 video would play way too fast, like on fast forward, > and without any sound. The problem was that the alsa and pulse audio drivers > needed updating. The clue was found on some random website via Google Search > in a post by some guy saying his too fast, soundless html5 videos played at > normal speed once he killed the pulse audio process. Just an FYI, if anyone else here experiencing the halting Adobe Flash videos problem with Mozilla Firefox, this is due to a few default settings in Mozilla Firefox being set incorrectly. This is for the Mozilla Firefox versions 41.0.1 and 41.0.2 with Adobe Flash for Linux versions 11,2,202,521 and 11,2,202,540. These are the current versions. This didn't seem to be an issue with Mozilla Firefox 31 or 33. Enter about:config in the URL bar and make sure the settings below are correct. 'true' is the default for each. media.wemb.enabled set to 'false' forces Adobe Flash and must be set to 'true' for HTML5. The setting layers.offmainthreadcomposition.enabled when set to 'true', the default, requires constant mouse movement with Adobe Flash for videos to not halt. html5.offmainthread when set to 'true', the default, causes odd graphics rendering glitches with certain websites, probably with HTML5 enabled. media.webm.enabled true layers.offmainthreadcomposition.enabled false html5.offmainthread false BTW, if you also have some "pink" floating numbers you can't get rid of appearing on Mozilla Firefox's menus, this is due to the setting layers.acceleration.draw-fps which needs to be set to false. These options may be wrong due to their values being inherited to earlier Mozilla Firefox installations or being activated upon recommendation of various webpages on Mozilla Firefox speed up settings. Rod Pemberton -- When El Chapo is the most beloved man in Mexico and Trump is the most hated, it shows that Mexico is truly fouled up.
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2015-12-27 12:40 +0000 |
| Message-ID | <n5om2t$cuc$1@dont-email.me> |
| In reply to | #8880 |
On 06/10/2015 02:57, Rod Pemberton wrote: > On Mon, 05 Oct 2015 10:01:16 -0400, James Harris > <james.harris.1@gmail.com> wrote: > >> On 05/10/2015 02:27, Rod Pemberton wrote: >>> On Sun, 04 Oct 2015 11:36:08 -0400, James Harris >>> <james.harris.1@gmail.com> wrote: >>>> On 02/10/2015 22:17, Rod Pemberton wrote: > >>>> say you are typing into a text-entry field. You >>>> might want: >>>> >>>> * V and Shift+V to be passed to the text-entry field >>>> * Control-V to trigger a Paste operation >>>> * Alt+V to be passed to the window to pull down the View menu >>>> * Windows+V to start an app >>>> >>>> That requires the different key combinations to be handled in different >>>> places, not just the widget which has focus. The component which >>>> receives the keystroke event will differ depending on what the event >>>> is. >>>> I was asking how a UI should control which events go to which >>>> components. ... > Isn't all of this just an issue of how you want to split the keyboard's > stream or filter it? > > I.e., send it forward and filter as it goes, send it backward and filter > as it goes, send it directly to the appropriate object or item, allow > multiple objects to access or not, etc. Sorry for delayed replies. I have been caught up with other things and have done very little on this. Yes, how to direct keystrokes is a big part of it. As I think you mean, the issue is whether to direct them down from general to more-detailed or vice versa. One of the few things I have worked out since my last post is that I would need to support both: down first to the most specific then, if not handled, back up. Each component could, potentially, get two chances to see and deal with the event. It sounds a pain but seems to be necessary. IIRC it turned out that in a browser environment Mozilla initially supported flowing down from general to specific and Microsoft supported flowing up from specific to general. Some people call the two forms of event flow "capture" and "bubble" respectively. ... >>>> I guess I was asking if and how a GUI's messaging should be >>>> set up so that an app could not take over keys that the user might want >>>> to use for the GUI's windows. >>> >>> Perhaps, don't let the app have any access. I.e., a text field is a >>> part of the OS, a widget is a part of the OS, a menu is a part of the >>> OS, etc. If the app can only call a function for each of the menuing >>> elements, then the OS keeps control. You're a strong propoent of >>> modularity anyway. So, this should fit right in with your values. :) >> >> That sounds good but is it possible for the OS to keep control? Take the >> example above. If the OS launches a web browser and passes it things >> like Alt+ keystrokes for its own menus how can it prevent the browser >> then passing those keystrokes to an app the browser is running? > > Does the OS control all the ways the "app the browser is running" can use > those keys? If yes, i.e., if the OS controls the input boxes/fields even > though the app is using them, then there is nothing more to do. If no, > then the stream would need to be filtered or split so that the "app the > browser is running" won't receive them. That's valid. I don't know yet whether it is feasible that the OS would always have full control or not, but that would be preferable. James
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Date | 2015-12-27 15:51 -0500 |
| Message-ID | <op.yablj4i6yfako5@localhost> |
| In reply to | #9044 |
On Sun, 27 Dec 2015 07:40:17 -0500, James Harris <james.harris.1@gmail.com> wrote: > On 06/10/2015 02:57, Rod Pemberton wrote: >> On Mon, 05 Oct 2015 10:01:16 -0400, James Harris >> <james.harris.1@gmail.com> wrote: >>> On 05/10/2015 02:27, Rod Pemberton wrote: >>>> On Sun, 04 Oct 2015 11:36:08 -0400, James Harris >>>> <james.harris.1@gmail.com> wrote: >>>>> say you are typing into a text-entry field. You >>>>> might want: >>>>> >>>>> * V and Shift+V to be passed to the text-entry field >>>>> * Control-V to trigger a Paste operation >>>>> * Alt+V to be passed to the window to pull down the View menu >>>>> * Windows+V to start an app >>>>> >>>>> That requires the different key combinations to be handled in >>>>> different places, not just the widget which has focus. The >>>>> component which receives the keystroke event will differ >>>>> depending on what the event is. >>>>> I was asking how a UI should control which events go to which >>>>> components. > > Sorry for delayed replies. I have been caught up with other things > and have done very little on this. That's OK. After three months, I just assumed you were hit by one of those city buses. But, I didn't feel any permanent disturbance in the force, so I assumed you were OK ... :-) >> Isn't all of this just an issue of how you want to split the keyboard's >> stream or filter it? >> >> I.e., send it forward and filter as it goes, send it backward and filter >> as it goes, send it directly to the appropriate object or item, allow >> multiple objects to access or not, etc. > > Yes, how to direct keystrokes is a big part of it. As I think you mean, > the issue is whether to direct them down from general to more-detailed > or vice versa. Yes, it looks like that might've been what I meant. ;-) > One of the few things I have worked out since my last post is that > I would need to support both: down first to the most specific then, > if not handled, back up. Ok. (FYI. By "down first," did you mean sent directly to the first, or passed down through others to the first? I've assumed the latter here.) > Each component could, potentially, get two chances to see and deal > with the event. It sounds a pain but seems to be necessary. Well, it would also allow for pre- and post-processing on the same key. E.g., key to maximize window passed down, window maximizes, then low-level mouse hook detects the key and relocates the mouse pointer to the text field, then key passed back on window closed or minimization, then higher-level mouse hook detects the key and restores the original mouse pointer position. > IIRC it turned out that in a browser environment Mozilla initially > supported flowing down from general to specific and Microsoft supported > flowing up from specific to general. Some people call the two forms of > event flow "capture" and "bubble" respectively. Interesting terminology. Which do you think works better? I've used both. IE for a decade. MF for a few years now. At the moment, I don't recollect much functional difference. Both seemed to be responsive to the user. Maybe, I'll recall something later. Obviously, there is no point in wasting processor time to do things which may be unneeded. So, I'd personally go with whichever is more direct, unless there is an important reason to choose something more complicated. >>>>> I guess I was asking if and how a GUI's messaging should be >>>>> set up so that an app could not take over keys that the user might >>>>> want to use for the GUI's windows. >>>> >>>> Perhaps, don't let the app have any access. I.e., a text field is a >>>> part of the OS, a widget is a part of the OS, a menu is a part of the >>>> OS, etc. If the app can only call a function for each of the menuing >>>> elements, then the OS keeps control. You're a strong propoent of >>>> modularity anyway. So, this should fit right in with your values. :) >>> >>> That sounds good but is it possible for the OS to keep control? Take >>> the example above. If the OS launches a web browser and passes it things >>> like Alt+ keystrokes for its own menus how can it prevent the browser >>> then passing those keystrokes to an app the browser is running? >> >> Does the OS control all the ways the "app the browser is running" can >> use those keys? If yes, i.e., if the OS controls the input boxes/fields >> even though the app is using them, then there is nothing more to do. >> If no, then the stream would need to be filtered or split so that the > "app the browser is running" won't receive them. > > That's valid. I don't know yet whether it is feasible that the OS would > always have full control or not, but that would be preferable. > If that's so, then I think the next question is: "Is the app required to request input from the OS or does the OS send it to the app?". Do both require message-passing? buffering? Since it's been a while since this thread was in my head, I don't recollect if I brought this up before. I haven't reread the thread. Rod Pemberton -- The idea that sentient beings can be suppressed by a few simple rules is a farce. Even so, Isaac Asimov posited such rules for sentient artificial intelligence.
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-03 12:08 +0000 |
| Message-ID | <n6b2r2$jj9$1@dont-email.me> |
| In reply to | #9050 |
On 27/12/2015 20:51, Rod Pemberton wrote: > On Sun, 27 Dec 2015 07:40:17 -0500, James Harris > <james.harris.1@gmail.com> wrote: > >> On 06/10/2015 02:57, Rod Pemberton wrote: ... >> Sorry for delayed replies. I have been caught up with other things >> and have done very little on this. > > That's OK. After three months, I just assumed you were hit by one > of those city buses. But, I didn't feel any permanent disturbance > in the force, so I assumed you were OK ... :-) [OT] A quick summary: Three main issues have distracted me from the normal IT stuff: 1) A dispute with the local council about a so-called traffic infraction. 2) The issue of UK independence from the European Union - resulting in time spent on Twitter and looking at setting up a new web site and delivery system - not done yet. 3) Selling my old Aga cooker. When it was dismantled it resulted in large quantities of dust being spread around the house and getting onto floors, surfaces and into clothes, towels etc. Some of it is still invisibly present in the air despite lots of cleaning. I cannot confirm without a specialist's analysis but it is worrying as the dust likely contains asbestos. The bottom line is being distracted with other things and not having much time left to think about the normal IT issues we discuss here. ... >> One of the few things I have worked out since my last post is that >> I would need to support both: down first to the most specific then, >> if not handled, back up. > > Ok. > > (FYI. By "down first," did you mean sent directly to the first, or > passed down through others to the first? I've assumed the latter here.) I meant "down" as in "drill down" from general to specific. Events would have to flow down to target widgets then back up. Any container or the final widget could stop the event propagating further. The HTML DOM works that way so there is a precedent. http://stackoverflow.com/questions/4616694/what-is-event-bubbling-and-capturing ... >> IIRC it turned out that in a browser environment Mozilla initially >> supported flowing down from general to specific and Microsoft supported >> flowing up from specific to general. Some people call the two forms of >> event flow "capture" and "bubble" respectively. > > Interesting terminology. Which do you think works better? I think both mechanisms are needed. I don't think either of the terms is very good. > I've used both. IE for a decade. MF for a few years now. At the > moment, I don't recollect much functional difference. Both seemed > to be responsive to the user. Maybe, I'll recall something later. > > Obviously, there is no point in wasting processor time to do things > which may be unneeded. So, I'd personally go with whichever is more > direct, unless there is an important reason to choose something more > complicated. IIRC, at least in JavaScript, a widget/container has two chances to capture an event: on the way down and on the way back up, and that the JavaScript event registration call assumes "up" by default. ... >>> Does the OS control all the ways the "app the browser is running" can >>> use those keys? If yes, i.e., if the OS controls the input boxes/fields >>> even though the app is using them, then there is nothing more to do. >>> If no, then the stream would need to be filtered or split so that the >> "app the browser is running" won't receive them. >> >> That's valid. I don't know yet whether it is feasible that the OS would >> always have full control or not, but that would be preferable. >> > > If that's so, then I think the next question is: "Is the app required to > request input from the OS or does the OS send it to the app?". AIUI, with an event-driven program the widgets typically tell the UI what they are interested in and then the UI tells the registered functions when one of those events occurs. But the app could also have a main loop which receives every event and decides itself where to direct it or what to do with it. > Do both require message-passing? buffering? I don't know about "require" but I think message passing is a good model for this. James
[toc] | [prev] | [next] | [standalone]
| From | Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> |
|---|---|
| Date | 2016-01-03 14:55 -0500 |
| Message-ID | <20160103145555.0eb69be5@_> |
| In reply to | #9066 |
On Sun, 3 Jan 2016 12:08:31 +0000 James Harris <james.harris.1@gmail.com> wrote: > On 27/12/2015 20:51, Rod Pemberton wrote: > > On Sun, 27 Dec 2015 07:40:17 -0500, James Harris > > <james.harris.1@gmail.com> wrote: > > > >> On 06/10/2015 02:57, Rod Pemberton wrote: > >> Sorry for delayed replies. I have been caught up with other things > >> and have done very little on this. > > > > That's OK. After three months, I just assumed you were hit by one > > of those city buses. But, I didn't feel any permanent disturbance > > in the force, so I assumed you were OK ... :-) > > [OT] A quick summary: [OT] There was no need to explain. I'm still needing to cut way back or stop for some time too. > 1) A dispute with the local council about a so-called > traffic infraction. So, did you get a traffic obstruction charge for moving that, heavy as a car, Aga oven? Hey, I thought speeding tickets, parking tickets, and traffic obstruction were for teenagers and college students on the move. :) > 2) The issue of UK independence from the European Union - resulting > in time spent on Twitter and looking at setting up a new web site and > delivery system - not done yet. What? Why doesn't the U.K. want to be part of the E.U.? That should, in theory, based on the U.S. federal and state model, be great for the U.K. economy. Does Germany have too much power in the E.U.? Is the E.U. taxing or regulating the U.K. too much? Back when the Euro was first implemented, I thought it wouldn't last too long, because there was no central government, e.g., U.S. federal government controls monetary policy for all of the U.S. states. However, the Euro has managed to survive so far, albeit with some troubles. Doesn't a common currency have some benefit? Even in the U.S., our currency is more valuable in certain regions, and far less valuable in others, based on the prices being paid. That's not good for working people, but great for retirement. > 3) Selling my old Aga cooker. When it > was dismantled it resulted in large quantities of dust being spread > around the house and getting onto floors, surfaces and into clothes, > towels etc. Some of it is still invisibly present in the air despite > lots of cleaning. I cannot confirm without a specialist's analysis > but it is worrying as the dust likely contains asbestos. I've seen those range top and oven combinations on TV, but I'm not sure if they're available in the U.S. If Wikipedia is correct, they're a major source of wasteful energy consumption in the E.U., and probably a source of unnecessary green house gas emissions too. Although, some of them, the oldest, I'm guessing, are valuable as collectors items, or used in home restorations for the wealthy. As for asbestos, anything that is suspected of having it here requires a permit or license to remove, and requires you to hire a specialty removal company which will you charge a large sum of money to do so. Otherwise, you end up with a huge government fine and jail time for environmental pollution, if you intentionally, or even accidentally, disperse asbestos. Although, you probably won't end up in trouble for this in rural areas, as they have less government and enforcement. Asbestos was used in all sorts of products, including automobile brakes, etc, the main source of problems for people here are old insulated heating and cooling ducts. These are easy for the home owner to remove and replace, and are covered in the stuff in old homes. Old homes also had lead paint, which requires similar remediation. Most other sources of contamination affect businesses and not homeowners. Many of the apparently extremely inexpensive homes in decaying U.S. industrial cities have these hidden expenses. Such abandoned or foreclosed urban homes also usually come with unpaid tax bills in the form of liens. I.e., these unpaid taxes are taxed to the property in major cities and suburbs, and so pass from home owner to home owner until paid, instead of being treated as debt and charged to an a specific individual or family. Think of all those foreign, mostly Chinese, investors who invested in bundles of such extremely cheap homes in the U.S. a few years ago as rental properties. They got tax liens, asbestos remediation, lead remediation, rot and decay, broken windows, theft of copper pipes and wiring, ... Well, profit is made on the low end, but does the world ever get tired of buying financial crap? [EOT] > >> One of the few things I have worked out since my last post is that > >> I would need to support both: down first to the most specific then, > >> if not handled, back up. > > > > [link] The link suggests that "trickling" is slightly faster than "bubbling" for something to do with browsers ... (HTML DOMS) I would have to question as to why that is. I.e., this may be something due to implementation or language design, as I can't immediately think of any inherent difference simply due to the direction of data passing. E.g., they may have implemented something in the "trickling" path that filters out more objects so less data passing or message passing is occurring. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-13 17:58 +0000 |
| Message-ID | <n76345$pn6$1@dont-email.me> |
| In reply to | #9071 |
On 03/01/2016 19:55, Rod Pemberton wrote: > On Sun, 3 Jan 2016 12:08:31 +0000 > James Harris <james.harris.1@gmail.com> wrote: ... > [OT] > > There was no need to explain. I'm still needing to cut > way back or stop for some time too. > >> 1) A dispute with the local council about a so-called >> traffic infraction. > > So, did you get a traffic obstruction charge for moving that, > heavy as a car, Aga oven? Hey, I thought speeding tickets, > parking tickets, and traffic obstruction were for teenagers > and college students on the move. :) :-) No, my car was stationary for an estimated 12 seconds with some of the car in a space reserved for taxis. I didn't know it at the time but apparently taxi ranks are hallowed ground - more sacred than almost any other part of the highway. To have two wheels into one is considered an offence. I say 12 seconds as an estimate; the council caught just 6 seconds of video of my car being stationary but that was enough for them to issue a transgression notice and a fine. The relevant law is about "parking, waiting and stopping". It seems that I could have parked in the space, done some shopping and had a meal - and still have received exactly the same fine. The Law is that taxi ranks in London and elsewhere are to be kept free for the use of taxis - sensibly in order to avoid transport delays. The fact that the road was in the suburbs, was deserted at the time - being empty of taxis or any other moving vehicle - and is a non-through road didn't bother the local council. Their video runs for some time after the incident and shows there were no moving vehicles anywhere around. Imagine tumbleweed blowing across a US parking lot and you get the general idea. But despite the absence of other traffic and the shortness of the time I was there and the fact that no delay was caused to anyone the council claimed I had broken a regulation and had to pay a fine. I think that in the event of a nuclear holocaust there will still be someone in a local council office monitoring cameras and issuing fines for technical infractions because that's his job. I was pretty much incensed that a motorist using the highway sensibly (I basically pulled to one side so as not to block the road while I let a passenger out; that is why only two wheels were in the space) would be penalised. I decided to fight it - ultimately unsuccessfully, as it turned out. In researching so I could appeal against the penalty I found that the law was written in absolute terms but that councils are provided with guidelines under which they are expected to operate. (E.g. they should use such powers reasonably and only where necessary.) They clearly did not follow the guidelines. However, it seems that no one checks that they comply with and that they cannot be held accountable for ignoring the guidelines. As far as I can tell, even the appeals tribunal could not find against the council in respect of the guidelines, only against the letter of the law. I saw this as more of an injustice than a cost and wanted to see if I could get the 'system' changed. However, my local MP (political representative) was about as effective as a wet rag so there's no mileage there. In fairness, I am sure he has bigger issues to deal with such as constituents losing their homes or being deported etc. One supposed comfort which was not a comfort at all is that I found a prior tribunal case wherein another motorist was treated much worse than I was. Again, the council failed to act in line with the guidelines they were given - their actions were even more unreasonable than in my case - but the tribunal did not reject the council's case. Madness! I don't know if UK councils are worse than elsewhere or whether other countries have similarly daft systems. I'll have to get back to the other points later. Am just going to have a meal and watch Captain Kirk do battle with some foe or other. At least that will cheer me up! James
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-15 11:32 +0000 |
| Message-ID | <n7al82$rvl$1@dont-email.me> |
| In reply to | #9071 |
On 03/01/2016 19:55, Rod Pemberton wrote: > On Sun, 3 Jan 2016 12:08:31 +0000 > James Harris <james.harris.1@gmail.com> wrote: [OT] >> 2) The issue of UK independence from the European Union - resulting >> in time spent on Twitter and looking at setting up a new web site and >> delivery system - not done yet. > > What? > > Why doesn't the U.K. want to be part of the E.U.? AIUI most people in the UK currently want to stay in the EU (though they may not know too much about what that means). Along with them are * the mainstream broadcast media * big businesses (at least, most of them) * most members of the main political parties Against remaining in the EU are * much of the newsprint media * one party (UKIP) and portions of other parties > That should, in theory, based on the U.S. federal > and state model, be great for the U.K. economy. I am not sure what you mean there. Do you mean that being in the EU should be great for the UK economy? > Does Germany have too much power in the E.U.? Yes. Germany contributes most to EU coffers http://news.bbc.co.uk/1/hi/world/europe/8036097.stm#start but Germany also has disproportionate power. For example, UK news reports often say that for the UK PM to get the EU to agree with his view he has to get the German chancellor onside. It seems that EU leaders like to achieve consensus and may subjugate their own preferences (and, arguably, even the needs of their own citizens) in order to agree with what they see as the main bloc. For someone who expects elected leaders to represent the electorate that desire for governmental accord seems very strange and somewhat worrying. Some British politicians say that the UK must be in the EU 'at the top table' in order to influence EU policy. There is some sense in that for sure but, IIRC, the UK has LOST more votes in the European Council than any other country - so the influence does not always translate to policy. > Is the E.U. taxing or regulating the U.K. too much? The UK is a big net contributor to the EU but it's not so much that, IMO. When I looked in to this I found that EU membership has a number of problems. * Primarily, it is undemocratic. UK law is *subject* to EU law and yet UK voters have no say in those laws and cannot choose the main lawmakers. The EU leaders who make these laws are not challenged by any UK body either in interviews or before committees. This has very real effects. For example, the German chancellor invited an unlimited number of migrants in to Germany - all who could get there - and soon after that said that Germany should not cope alone and that other countries should shoulder the load; the migrants should be shared out and/or paid for by all EU countries. The German invitation encouraged many more migrants and families (who have the funds to pay people traffickers) to make the journey. Many of those people including children have drowned trying to make the crossing. The UK approach, however, is to fund refugees near their homes and, albeit under pressure, to bring the most needy directly from those camps into the UK. Yet all EU countries are affected by the German policy. * The UK is under high population pressures (schools, doctors, hospitals, housing) yet under EU law the UK has absolutely no control over the number of EU citizens moving to the UK. Anyone who wants to can come and, if they need it, will be supported by the UK's welfare system. * The UK govt is in an eyewatering amount of debt - £1.5 trillion, approximately 5% of the tax take is spent just servicing the debt and that may well go up if and when the costs of borrowing increase. Despite years of 'austerity' measures which have made life harder for the poorer parts of society the UK's debt is still increasing each year. The debt is of such a high figure it will probably have to be paid for by our children and grandchildren so people are living now on money that they are effectively borrowing from their descendants. Yet the UK pays significant welfare to non-UK people, some of whom then send things like child benefits back home to the countries where their families are. * Economic conditions vary a lot across the EU creating a flow of people from poorer to richer countries. That is not good for either the rich or the poor countries. * Europe has porous borders. Migrants can get in to the EU (perhaps risking their lives and those of their children). In a core part of the EU (the Schengen zone) there have long been no border checks at all. Some border checks were put back after the Paris terrorist attacks but the EU's strong goal is to restore Schengen open borders. * EU policies have already brought in and are continuing to bring in an unknown number of terrorists as well as large groups who are not terrorists but who do not share the West's traditional respect for women. There have already been assaults, rapes, intimidation and killings. Again, the decision makers are not held to account by UK media and don't have to do what the people want in order to remain elected. > Back when the Euro was first implemented, I thought it > wouldn't last too long, because there was no central > government, e.g., U.S. federal government controls > monetary policy for all of the U.S. states. However, > the Euro has managed to survive so far, albeit with > some troubles. Doesn't a common currency have some > benefit? Even in the U.S., our currency is more > valuable in certain regions, and far less valuable > in others, based on the prices being paid. That's > not good for working people, but great for retirement. Yes, a common currency has some benefits. For example, it is particularly good for international businesses in avoiding exchange-rate uncertainties and transaction costs. The common currency works well if the countries' economies are similar, as is the case for, say, Germany and France who are among the biggest decision makers. For countries with vastly differing economies, however, it can be a straitjacket, requiring the poorer countries to conform to the demands of the larger countries. Greece is going through a nightmare just now and has been for years. The UK chose not to join the Euro for various reasons. That has turned out to be a very good choice - dodging a bullet! Don't get me wrong. I can see that there are good things about EU membership, too. However, as the EU is a customs union those benefits are mainly to large companies with international trading - what I believe economists call vested interests. The main thing for me is that the EU takes away that essential ultimate control by the citizens. (An American should recognise the importance of the opening words of the US constitution: We the people...!) As history has shown, it is dangerous when governments are not accountable to the populations they rule over. James
[toc] | [prev] | [next] | [standalone]
| From | Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> |
|---|---|
| Date | 2016-01-16 03:29 -0500 |
| Message-ID | <20160116032912.69a7cd08@_> |
| In reply to | #9083 |
On Fri, 15 Jan 2016 11:32:45 +0000 James Harris <james.harris.1@gmail.com> wrote: > On 03/01/2016 19:55, Rod Pemberton wrote: > > On Sun, 3 Jan 2016 12:08:31 +0000 > > James Harris <james.harris.1@gmail.com> wrote: [all OT] > >> 2) The issue of UK independence from the European Union - resulting > >> in time spent on Twitter and looking at setting up a new web site > >> and delivery system - not done yet. > > > > What? > > > > Why doesn't the U.K. want to be part of the E.U.? > > [...] > > That should, in theory, based on the U.S. federal > > and state model, be great for the U.K. economy. > > I am not sure what you mean there. Do you mean that being in > the EU should be great for the UK economy? Yes, in theory. Well, it's like the British Empire. More countries. More trade. More wealth. Importing low lowers the cost of living. Exporting high raises the standard of living. > > Does Germany have too much power in the E.U.? > > Yes. Germany contributes most to EU coffers > > http://news.bbc.co.uk/1/hi/world/europe/8036097.stm#start > > but Germany also has disproportionate power. > Is the UK able to *buy* parity? I.e., increase payments to match Germany's. From the link, it would seem the major payments are percentage (GNI, VAT) or volume based (customs duties). Perhaps, an argument based on economic discrimination could bring parity. I.e., incite Malta, Cyprus, Estonia et. al. to claim the EU system is inherently unfair because relative power is proportionate to the financial payments, and then have all the poor countries threaten to leave the EU. If the argument is accepted, power equality results. > For example, UK news > reports often say that for the UK PM to get the EU to agree with his > view he has to get the German chancellor onside. It seems that EU > leaders like to achieve consensus and may subjugate their own > preferences (and, arguably, even the needs of their own citizens) in > order to agree with what they see as the main bloc. For someone who > expects elected leaders to represent the electorate that desire for > governmental accord seems very strange and somewhat worrying. (Note to self. Look up "onside". Ok. We say "onboard" here.) It sounds like there is a balance of power issue. The US model divides power between government branches and portions of government entities. > Some British politicians say that the UK must be in the EU 'at > the top table' in order to influence EU policy. Well, I would think that most of the countries which currently contribute the majority of general funds to the EU other than Germany (i.e, Italy, France, UK, Spain) would want power parity with Germany. Together, perhaps under threat of EU withdrawal, they could definitely force Germany to agree. If the UK is the only country that wants to threaten this, then perhaps the other countries could be convinced of supporting the UK, either in solidarity or as a favor. Otherwise, Germany, as the apparent dominant economic machine in the EU, will come to dominant the EU bureaucracy totally. ISTM, that there is no reason the top five or six, or perhaps seven, EU states shouldn't have power parity. A "union" is supposed to be of equals. It doesn't sound like the "European Union" is actually a union. > * Primarily, it is undemocratic. That's a problem. It goes hand in hand with the rule of law and capitalism. Those don't work well without each other. > UK law is *subject* to EU law In the US, from the constitution, the states have the rights to make laws on any issue not assigned as a right of the federal government. I.e., federal government rights are limited to higher level national issues, generally. So, states are not subject to federal law in the US, except for the constitution and US Supreme Court rulings. States are not subject to treaties with the federal government. This is how states can legalize drugs, gambling, etc while the federal government outlaws them. Of course, Supreme Court rulings can overturn states laws, e.g., gay marriage. This is also why copyright laws in the US for US citizens and residents follow state and/or federal laws and not international treaties, i.e., there is no international aspect involving a US citizen and can't be brought into an international court of law where a treaty might apply. The latter is usually a point of contention with those in the EU who insist that all copyrights in the US follow the Berne convention since the US is a signatory. They don't. > UK law is *subject* to EU law and yet UK voters have no say in > those laws and cannot choose the main lawmakers. The EU leaders > who make these laws are not challenged by any UK body either in > interviews or before committees. That doesn't seem to be representative, perhaps, more totalitarian. > This has very real effects. For example, the German chancellor > invited an unlimited number of migrants in to Germany - all who > could get there - and soon after that said that Germany should not > cope alone and that other countries should shoulder the load; the > migrants should be shared out and/or paid for by all EU countries. Is there really any difference between the ability to charge without recourse and the ability to tax? We experienced this with ObamaCare individual mandate. Did the UK grant the EU the power to tax it on for any issue? Handling undesired immigrants is definitely a tax. > * The UK is under high population pressures (schools, doctors, > hospitals, housing) yet under EU law the UK has absolutely no control > over the number of EU citizens moving to the UK. Anyone who wants to > can come and, if they need it, will be supported by the UK's welfare > system. Doesn't the EU criticize the US for not putting immigrants on welfare? Doesn't the EU criticize the US for the future "Great Wall of Mexico"? (It's coming ...) Border control and immigrant control is important. You need to know what type of person is entering your country to make decisions about them. Those are federal issues here since the federal government controls national immigration and both national and state borders. Individual US states probably have control within their states. I'm not sure as to what degree. Most likely, if an immigrant is a problem, they are first sent to prison for any crimes they were found guilty of in a court of law if any, then deported via federal customs and immigration agency. > * The UK govt is in an eyewatering amount of debt - £1.5 trillion, > approximately 5% of the tax take is spent just servicing the debt and > that may well go up if and when the costs of borrowing increase. I'm always surprised by how liberal EU countries are and how supportive they are of social programs too. IMO, this is the natural economic outcome: debt. It's only a matter of time before more socialist or liberal elements of US society push for food for all, minimum income for all, homes for all, etc. How do you pay for all that? I.e., it's simply not always possible to implement equitable social justice given the available funds. Someone must suffer. Our social security program is a constantly broke Ponzi scheme. Our welfare programs are constantly broke, because we simple have too many people here to employ post industrialization. Our healthcare (ObamaCare) is another even worse Ponzi scheme likely to implode in a massive global financial meltdown. Whomever authored it flunked economics and didn't fix the causes of our costly healthcare. The only thing saving these flawed schemes from impending doom has been the repeated recovery of the US economy, i.e., our workers start making a lot more money. > * Economic conditions vary a lot across the EU creating a flow of > people from poorer to richer countries. That is not good for either > the rich or the poor countries. Why don't the rich countries employ the people in poor countries? I.e., no need for them to seek better life elsewhere if paid well. George Soros seems to be fond of social engineering in the EU, albeit his misguided policies are probably bad for the EU and people in those countries long-term, but better than the alternative of preserving the failed policies of communism. > * Europe has porous borders. Our states do too. This is a rather nice feature of a free country. I would hope to not lose that in the US also. We already lost our fourth amendment right to freedom from search after the 9/11 event on major forms of public transportation. Porous borders isn't an issue for the US *when* the borders are protected at the national or federal level, but they aren't doing their job well, in part due to a negligent President. Albeit, we have strengthened border patrol for both Mexico and Canada post 9/11 event. Canada was unnecessary, really. It only helps with drug enforcement, not immigration, but anything which helps law enforcement is protected and enhanced even at the expense of our freedom. Misguided. > Migrants can get in to the EU (perhaps > risking their lives and those of their children). Ditto for Mexico here. > * EU policies have already brought in and are continuing to bring in > an unknown number of terrorists as well as large groups who are not > terrorists but who do not share the West's traditional respect for > women. There have already been assaults, rapes, intimidation and > killings. Cultural problems resulting from immigration die down over time. Read up on US history. Each time a new group of immigrants enters the US, there are fights and conflicts for decades. Indoctrination in the laws and strong law enforcement by the police helps to reduce. A generation or two later, most immigrants are naturalized and become integrated into American society. Few problems. The exception are Jews and blacks, both of whom choose not to integrate. Blacks use slavery as an excuse (150 years old ...) to continue to attack the US system. All other immigrants chose to come here. They didn't. Unfortunately, our society doesn't need blacks for workers anymore, slave or free. Their jobs were exported or industrialized or mechanized or "roboticized". I suspect societal issues with blacks in America will only become worse. > Don't get me wrong. I can see that there are good things about EU > membership, too. However, as the EU is a customs union those benefits > are mainly to large companies with international trading - what I > believe economists call vested interests. I think that once the balance-of-power and union-versus-state rights are worked out, then the EU would be more beneficial to Europe. I'm rather surprised they didn't seem to learn anything from the US model on those issues. The US model was the result of failures of the British government, the Catholic Church's power in Europe, and perhaps even other government models, e.g., French. Our government formation documents are a great gift freely given to the world that no country seems to want to implement ... > The main thing for me is that the EU takes away that essential > ultimate control by the citizens. Use the system to change the system or overthrow it. The latter is how America was founded and was illegal then and now. The former is how it usually works today. > (An American should recognise the > importance of the opening words of the US constitution: We the > people...!) As history has shown, it is dangerous when governments > are not accountable to the populations they rule over. Agreed, albeit, it is becoming more and more difficult to keep our supposedly absolute US rights absolute. Laws and court cases keep chipping away at our rights, redefining meanings, and strengthening or weakening laws as the courts see fit. It's only a matter of time before someone argues that "bear arms" grants us the right to a "bear's legs" and other body parts, therefore somehow prohibits gun ownership. With our current cast of Supreme Court justices acting like a bunch of Disney characters, it could happen too. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-16 13:44 +0000 |
| Message-ID | <n7dhaf$drr$1@dont-email.me> |
| In reply to | #9093 |
On 16/01/2016 08:29, Rod Pemberton wrote: > On Fri, 15 Jan 2016 11:32:45 +0000 > James Harris <james.harris.1@gmail.com> wrote: > [all OT] ... >> I am not sure what you mean there. Do you mean that being in >> the EU should be great for the UK economy? > > Yes, in theory. Well, it's like the British Empire. > More countries. More trade. More wealth. Importing > low lowers the cost of living. Exporting high raises > the standard of living. It is important to be aware that the EU is not just about free trade. It has two sides to it: 1) economic, 2) political. Wikipedia calls it "a politico-economic union". The economic side is generally accepted as a good thing. That is the side that leads to free trade (no import tariffs) and has meant that businesses across the EU zone have been able to trade freely in goods and employ workers from other EU countries. I.e. there is free movement of goods and people. I mentioned in my earlier reply that when many UK citizens say they want to remain in the EU they may not really understand it. That's because they think of it in terms of trade. I.e. they see the economic side of the EU and the improved wealth that has resulted therefrom. What many don't seem to be aware of is its political side. The political aspect of the EU is quite another matter. Its ruling commission is already very powerful and wants further powers. It would like there to be a fully federal solution, it already has primacy over member countries, and when there is a crisis it seeks to take more power. There is already talk of the EU even having its own army. What is more, EU treaties enshrine the policy of "ever closer union". Centralisation of power is in their very way of thinking. http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CBP-7230 I would like the UK to trade with the EU but not be in an undemocratic political union with it. I think most people would agree if they understood what the EU really is. >>> Does Germany have too much power in the E.U.? >> >> Yes. Germany contributes most to EU coffers >> >> http://news.bbc.co.uk/1/hi/world/europe/8036097.stm#start >> >> but Germany also has disproportionate power. >> > > Is the UK able to *buy* parity? I.e., increase payments to > match Germany's. No, it doesn't work like that. Those figures are just for the EU's budget - derived by a funding formula, AIUI, which sees some countries as net contributors and others - usually the poorer ones - as net beneficiaries. Naturally, the poorer ones want to stay in. And other poorer countries want to join. ... >> Some British politicians say that the UK must be in the EU 'at >> the top table' in order to influence EU policy. > > Well, I would think that most of the countries which currently > contribute the majority of general funds to the EU other than > Germany (i.e, Italy, France, UK, Spain) would want power parity > with Germany. Together, perhaps under threat of EU withdrawal, > they could definitely force Germany to agree. If the UK is the > only country that wants to threaten this, then perhaps the other > countries could be convinced of supporting the UK, either in > solidarity or as a favor. Otherwise, Germany, as the apparent > dominant economic machine in the EU, will come to dominant the > EU bureaucracy totally. I think it's fair to say that all EU countries benefit from their membership - at least due to trade. Some countries additionally want political union. That is the way some Europeans think. There is perhaps a European mindset that pushes them that way. They may be aware of European discord and wars of the past and want there to be a unified Europe where all men are brothers etc. Or they just think of working together. Many such see no problem with yielding their national sovereignty to a common superstate. For whatever reason the British mindset is different. They don't think like that. ISTM that for the Brits sovereignty, independence, self determination and the rule of law are more in focus. Of course, those are general views. Individuals differ. Yet I think there is a difference in attitude between the British and those in most of Europe. That makes most Europeans comfortable with the idea of political union while Brits want free trade, partnership, cooperation and friendship. ... >> * Primarily, it is undemocratic. > > That's a problem. It goes hand in hand with the rule of law > and capitalism. Those don't work well without each other. Indeed. Interestingly, UK politicians on both sides have spoken against the EU as undemocratic. Tony Benn was a politician who was very left wing. Margaret Thatcher was very right wing. Both could see the EU project for what it was. http://think-left.org/2015/07/06/tony-benn-the-case-against-the-eu-is-its-lack-of-democracy/ http://www.bbc.co.uk/news/uk-politics-11598879 ... >> UK law is *subject* to EU law and yet UK voters have no say in >> those laws and cannot choose the main lawmakers. The EU leaders >> who make these laws are not challenged by any UK body either in >> interviews or before committees. > > That doesn't seem to be representative, perhaps, more totalitarian. Right. >> This has very real effects. For example, the German chancellor >> invited an unlimited number of migrants in to Germany - all who >> could get there - and soon after that said that Germany should not >> cope alone and that other countries should shoulder the load; the >> migrants should be shared out and/or paid for by all EU countries. > > Is there really any difference between the ability to charge without > recourse and the ability to tax? We experienced this with ObamaCare > individual mandate. Did the UK grant the EU the power to tax it on > for any issue? Handling undesired immigrants is definitely a tax. The EU setup is very complex and I don't understand it all. (I am not sure that anyone does!) But the EU is financed by a funding formula that can require states to make retrospective payments. For example, the EU demanded another £1.7 billion because the UK economy had done well. http://www.bbc.co.uk/news/business-29751124 Interestingly the UK said loudly that it was unacceptable and that the government would not pay it. It was later paid quietly! http://www.dailymail.co.uk/news/article-3237073 I think they tried to stop it but the EU rules did not allow them to do so. As for migrants, the UK is not one of the countries that has to take those that Germany invited - at least not until they get EU passports. Then they will have free access. ... >> * The UK govt is in an eyewatering amount of debt - £1.5 trillion, >> approximately 5% of the tax take is spent just servicing the debt and >> that may well go up if and when the costs of borrowing increase. > > I'm always surprised by how liberal EU countries are and how supportive > they are of social programs too. IMO, this is the natural economic > outcome: debt. The UK's welfare system has long been generous but it became absurdly liberal in the fat times prior to the 2008 crash. Even some with high incomes received state aid. The current government is gradually changing things but each such alteration disadvantages someone so they are facing opposition and it seems that they are not doing a good job of explaining and persuading. Unfortunately, AIUI, under EU law the liberal welfare system that is applied to UK nationals must also be applied to any EU citizen who moves to the UK. It doesn't matter which country he or she came from. Note that EU citizens are not supported by the government of their own country (where they may previously have contributes by the paying of taxes) but by the government of the country where they reside. So a person who moves, say, from Romania to France, will enjoy the same benefits as any other French citizen. > It's only a matter of time before more socialist or > liberal elements of US society push for food for all, minimum income > for all, homes for all, etc. How do you pay for all that? I.e., it's > simply not always possible to implement equitable social justice given > the available funds. Someone must suffer. Our social security program > is a constantly broke Ponzi scheme. Our welfare programs are constantly > broke, because we simple have too many people here to employ post > industrialization. Our healthcare (ObamaCare) is another even worse > Ponzi scheme likely to implode in a massive global financial meltdown. > Whomever authored it flunked economics and didn't fix the causes of > our costly healthcare. The only thing saving these flawed schemes > from impending doom has been the repeated recovery of the US economy, > i.e., our workers start making a lot more money. Don't get me wrong. I am all for support for those who need it, especially if it is for a short period so that they can get themselves on their feet again. And I am in favour of governments doing whatever is necessary to make it possible for people to earn their own living. But each person who is able to earn a living should do so and should not expect state handouts they don't need. People should WANT to work and support themselves and their families. >> * Economic conditions vary a lot across the EU creating a flow of >> people from poorer to richer countries. That is not good for either >> the rich or the poor countries. > > Why don't the rich countries employ the people in poor countries? > I.e., no need for them to seek better life elsewhere if paid well. > George Soros seems to be fond of social engineering in the EU, > albeit his misguided policies are probably bad for the EU and > people in those countries long-term, but better than the alternative > of preserving the failed policies of communism. Companies make their own commercial decisions as to where they build premises, invest and employ people. There is a very informative map of average wage discrepancy at https://en.wikipedia.org/wiki/List_of_European_countries_by_average_wage#Map The discrepancies tend to create a migration from east to west. >> * Europe has porous borders. > > Our states do too. I meant Europe as a whole. People can get into Europe - often by sea. If they can get in as refugees or, recently, as any kind of migrant and receive an EU passport then they can travel to any EU country. ... >> Migrants can get in to the EU (perhaps >> risking their lives and those of their children). > > Ditto for Mexico here. Do Mexicans come in to the US by land or sea or a mixture of both? Do they take much of a risk in getting there? >> * EU policies have already brought in and are continuing to bring in >> an unknown number of terrorists as well as large groups who are not >> terrorists but who do not share the West's traditional respect for >> women. There have already been assaults, rapes, intimidation and >> killings. > > Cultural problems resulting from immigration die down over time. Maybe so. But how many of the existing citizens suffer in the meantime? Try telling the women who have been raped in Sweden or the people who were shot in Paris. Try telling their loved ones that it will all sort itself out in time and see how comforted they will feel. Too, if people refuse to integrate then serious problems can persist. Some migrants are genuinely fleeing war or persecution but others just want a better life. The EU has opened its doors to them all. Talking about EU madness.... To reduce the number of African migrants settling in the EU the EU leaders recently proposed that they would send Africans back to their home countries but also *pay* those countries to take them back. Imagine having to pay a country to take its own people back! Of course, those were economic migrants, not refugees. I think of a refugee as someone who is just glad to get to a place of safety. Imagine a genuine refugee's relief at getting across the border into a safe land where they won't be persecuted. But many recent migrants into the EU don't want to stop in the first safe country. They have specific goals in mind because they are moving for economic reasons and want to get to certain countries. Many migrants into the EU are not families but large groups of single men. They bring their own ways and standards, many of which are intolerant of western culture and standards. Some expect the host country to change its ways to match theirs. > Read up on US history. Each time a new group of immigrants enters > the US, there are fights and conflicts for decades. Indoctrination > in the laws and strong law enforcement by the police helps to reduce. Yes, education in the laws and ways of the new country is vital. I don't know if there's much of that going on, though. > A generation or two later, most immigrants are naturalized and become > integrated into American society. Few problems. The exception are > Jews and blacks, both of whom choose not to integrate. Blacks use > slavery as an excuse (150 years old ...) to continue to attack the > US system. All other immigrants chose to come here. They didn't. > Unfortunately, our society doesn't need blacks for workers anymore, > slave or free. Their jobs were exported or industrialized or > mechanized or "roboticized". I suspect societal issues with blacks > in America will only become worse. Individuals of whatever colour, creed or culture can and do integrate but, as you suggest, when groups avoid integrating and form their own communities then issues arise. Many current EU immigrants are Arabic or African Muslims and have their own allegiances and ways such as their beliefs in how women should dress and how women should be treated. Some have tried to set up Muslim areas where Sharia law applies and where non-Muslims are not welcome. So I am not as sanguine as you about a transition from discord to harmony. I don't see evidence in Europe of a willingness to integrate, or of a program to help people integrate, or signs that there will be peaceful coexistence in the future. >> Don't get me wrong. I can see that there are good things about EU >> membership, too. However, as the EU is a customs union those benefits >> are mainly to large companies with international trading - what I >> believe economists call vested interests. > > I think that once the balance-of-power and union-versus-state rights > are worked out, then the EU would be more beneficial to Europe. I'm > rather surprised they didn't seem to learn anything from the US model > on those issues. The US model was the result of failures of the > British government, the Catholic Church's power in Europe, and perhaps > even other government models, e.g., French. Our government formation > documents are a great gift freely given to the world that no country > seems to want to implement ... I don't share your optimism. The US' founding fathers were apparently noble men who, as you say, saw the abuses of power by the British or other original countries and wanted to establish something more equitable. By contrast, the EU founders and leaders are more focussed on governmental systems. As an example, the US constitution is a document of fundamental rights of the people relative to the government. The EU constitution is more about how the EU structures are to work than about protections for those governed. From a quick bit of searching it seems that the US constitution has about 4,500 words. By contrast, the number of words in the EU constitution is about 70,000. It is a document about structures, not about people. ... > With our current cast of Supreme Court justices acting like > a bunch of Disney characters, it could happen too. Any Disney characters in particular? James
[toc] | [prev] | [next] | [standalone]
| From | Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> |
|---|---|
| Date | 2016-01-16 12:55 -0500 |
| Message-ID | <20160116125530.330cd377@_> |
| In reply to | #9094 |
On Sat, 16 Jan 2016 13:44:08 +0000 James Harris <james.harris.1@gmail.com> wrote: [OT] Hey, I had large bunch of typo's in that last one, mostly due to editing. s/simple/simply/ s/dominant/dominate/ s/on for/on/ etc > Unfortunately, AIUI, under EU law the liberal welfare system that is > applied to UK nationals must also be applied to any EU citizen who > moves to the UK. It doesn't matter which country he or she came from. > > Note that EU citizens are not supported by the government of their > own country (where they may previously have contributes by the paying > of taxes) but by the government of the country where they reside. So > a person who moves, say, from Romania to France, will enjoy the same > benefits as any other French citizen. Our state unemployment and state welfare works that way. I.e., homeless people on state welfare move to states which provide more benefits. However, states don't provide anywhere near the amount of benefits as the federal government which is the primary provider. I.e., lesson, shift welfare costs to the EU "government" proper. Then, Germany will probably pay a larger share. > But each person who is able to earn a living should > do so and should not expect state handouts they don't need. > People should WANT to work and support themselves and their families. I agree. That almost sounds like a typical conservative American, which would put you on the far radical right in the UK. ;-) > >> Migrants can get in to the EU (perhaps > >> risking their lives and those of their children). > > > > Ditto for Mexico here. > > Do Mexicans come in to the US by land or sea or a mixture > of both? Do they take much of a risk in getting there? Sometimes, they cross around the border using the sea near Tijuana to San Diego. This is watched by the US coast guard and California's beach patrol, but sometimes people get through. But, mostly, according to news and TV shows here, they cross by land, typically close to California, or near major US or Mexican border cities, sometimes across the Rio Grande, then they typically travel through a desert to a highway. They seem to like desert areas because they are deserted and not well patrolled by authorities due to intense heat during the day and low local populations. Authorities generally have to use a helicopter because being out in the heat can be deadly. Next, they're picked up by Mexican gangs or smugglers along highways before the police pick them up and turn them over to the federal government to deport. These groups are usually cartel connected. So, after having paid the smugglers - whom are cartel controlled - to cross the border, they or their families in America or Mexico end up being extorted for more funds or the smuggled people are sold into slavery (esp. sexual for females) if they can't pay. I'm sure some of them probably go through the same tunnels that are used to smuggle drugs into the US. Of course, border walls, gates, barricades tend to be put where there are problems, but they did build a longer, taller, regular fence a few years back for a portion of the border. A complete, high-security border wall apparently hasn't been built yet. Historically, the US never checked the identity of people leaving the US. E.g., for decades you could exit the US and enter Tijuana without any documentation or search whatsoever. Mexico didn't check people coming in either. I.e., anybody leaving the US was either Mexican or a tourist with money. Recently, the US began enforcing a new law which records biometric data and checks documentation for people entering or leaving the US, but *only* for non-US citizens at this point. I.e., potential terrorists, Mexican gang or cartel members, and illegal immigrants from Mexico. Some days, I swear it's just a matter of time before we have no rights whatsoever. Everything will be outlawed or controlled. > >> * EU policies have already brought in and are continuing to bring > >> in an unknown number of terrorists as well as large groups who are > >> not terrorists but who do not share the West's traditional respect > >> for women. There have already been assaults, rapes, intimidation > >> and killings. > > > > Cultural problems resulting from immigration die down over time. > > Maybe so. But how many of the existing citizens suffer in the > meantime? Try telling the women who have been raped in Sweden or the > people who were shot in Paris. Try telling their loved ones that it > will all sort itself out in time and see how comforted they will feel. > > Too, if people refuse to integrate then serious problems can persist. What is one to do? I.e., allow in and accept some troubles or reject and let them suffer. Do you put them on probation? What? > Talking about EU madness.... To reduce the number of African migrants > settling in the EU the EU leaders recently proposed that they would > send Africans back to their home countries but also *pay* those > countries to take them back. Imagine having to pay a country to take > its own people back! Wow! That sounds like a good money making con to me. There are plenty of corrupt governments in Africa. There has to be a small country you can bribe. ;-) Just keep sending them around in a circle and collect money. If the EU wises up, then the cons may need some forged paperwork which should be easy for an African government. It's just another bribe. But seriously, what is Africa supposed to do with them? Imagine Africa attempting to integrate all American blacks. (I'm just being hypothetical, not racist.) What would all those "returned" people do in Africa? It's not like Africa has a shortage of people. This would create an immense strain on food and services, enhance black-on-black tensions, etc. A few of their cities now rival or exceed populations of major cities in the US, EU, China, Japan, etc. > > With our current cast of Supreme Court justices acting like > > a bunch of Disney characters, it could happen too. > > Any Disney characters in particular? :) No, I was just making fun of the fact that a few of them have recently made decisions completely out-of-line with their past history and apparent character. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-16 19:55 +0000 |
| Message-ID | <n7e73d$41a$1@dont-email.me> |
| In reply to | #9100 |
On 16/01/2016 17:55, Rod Pemberton wrote: > On Sat, 16 Jan 2016 13:44:08 +0000 > James Harris <james.harris.1@gmail.com> wrote: > > [OT] ... >>>> * EU policies have already brought in and are continuing to bring >>>> in an unknown number of terrorists as well as large groups who are >>>> not terrorists but who do not share the West's traditional respect >>>> for women. There have already been assaults, rapes, intimidation >>>> and killings. >>> >>> Cultural problems resulting from immigration die down over time. >> >> Maybe so. But how many of the existing citizens suffer in the >> meantime? Try telling the women who have been raped in Sweden or the >> people who were shot in Paris. Try telling their loved ones that it >> will all sort itself out in time and see how comforted they will feel. >> >> Too, if people refuse to integrate then serious problems can persist. > > What is one to do? I.e., allow in and accept some troubles or reject > and let them suffer. Do you put them on probation? What? I am no expert and am wary of pontificating from a point of view of ignorance. I get all my info from news reports and what I read, not first hand - so my views are clouded by what others have told me. However, I will try to answer your question, if only because I know that it's easy to say what's wrong with a system but to be realistic one has to back that up with what the system should be changed to. I don't believe that any one measure is appropriate and that a number of things all need to be done. * Yes, stop people coming by their own efforts. The current flow of humanity must be brought to an end. It is killing people. Just last night I saw on Sky News another three children were pulled dead from the sea. IIRC they were just 4 and 6 years old. It's an indictment against civilisation that such things happen. These children are so young. They have no say, no choice. As well as killing people such migrations fuel criminality because traffickers make vast profits from it. They can apparently charge thousands of pounds per person, load hundreds into boats and then let them fend for themselves. Many boats overturn and people drown. There have been reports of such trafficking helping fund ISIL or other terrorist organisations so such funds can lead to further deaths of innocent people. Again, it must be stopped. German chancellor Angela Merkel's invitation to take as many as could come was, IMO, highly irresponsible to the point of stupidity. * Publicise in each country on the migration routes that the borders are not open. That is so important in order to stop people starting the journey. Publicise, too, that Europe is not as good as the traffickers' propaganda makes it sound, and that people including children are lost to drowning. In their home countries publicise videos of migrants suffering, drowning, being deported etc in order to counter the narrative that starts people risking their lives by trying to migrate to Europe. * Ensure refugee camps are adequate places for people to live and for them to get education for their children. * Take in the refugees who are the most needy directly from the refugee camps as the UK is doing. Allow-in refugees only, not economic migrants (unless they are part of the country's normal immigration processes). Rather than the many relatively wealthy young men who are making their own way across this would allow poor families with children and/or infirmities to get priority. * Work on the causes of the war that is driving people away from Syria so that they can return home. * Work with countries in the region to give refuge for those who are displaced. While millions have come from Syria to Europe, "Gulf countries including Qatar, United Arab Emirates, Saudi Arabia, Kuwait, and Bahrain have offered zero resettlement places to Syrian refugees." That is according to https://www.amnesty.org/en/latest/news/2015/09/syrias-refugee-crisis-in-numbers/ * Fingerprint and, as you mention, put everyone who comes in on probation. Provide training to help them integrate: language, culture, behaviour, attitudes etc. * Start shipping back any who should not be here and do so very publicly, showing the process, not the individuals' faces. * Allow only selected families to stay after the war is over. Others by default should expect to go back to Syria once it is safe. * I hesitate to suggest forming an army but others have said that the young Syrian men who are migrating in such numbers could instead be making up forces that will be able to help take their country back when ready. Any good? I am thinking that that kind of approach would help those who really need the help but stop 90+% of the migration, keeping the would-be migrants and their children safe and also protecting European countries against taking in terrorists. >> Talking about EU madness.... To reduce the number of African migrants >> settling in the EU the EU leaders recently proposed that they would >> send Africans back to their home countries but also *pay* those >> countries to take them back. Imagine having to pay a country to take >> its own people back! > > Wow! That sounds like a good money making con to me. There are > plenty of corrupt governments in Africa. There has to be a small > country you can bribe. ;-) > > Just keep sending them around in a circle and collect money. If the > EU wises up, then the cons may need some forged paperwork which should > be easy for an African government. It's just another bribe. I'm glad you can see it. I was stunned when I heard that such a suggestion was being proposed. It is an example of the kind of thing that EU leaders think is an appropriate use of our taxes. > But seriously, what is Africa supposed to do with them? Imagine > Africa attempting to integrate all American blacks. (I'm just > being hypothetical, not racist.) What would all those "returned" > people do in Africa? It's not like Africa has a shortage of people. > This would create an immense strain on food and services, enhance > black-on-black tensions, etc. A few of their cities now rival or > exceed populations of major cities in the US, EU, China, Japan, etc. I was only talking about African governments taking back their own nationals. So a Somali government, for example, would take back Somali citizens whether they be black or white. James
[toc] | [prev] | [next] | [standalone]
Page 1 of 4 [1] 2 3 4 Next page →
Back to top | Article view | alt.os.development
csiph-web