473,657 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Using keyboard keys to activate buttons

Jukka K. Korpela wrote:
Scripsit MikeB:
>Short question:
Can I create a form where the user can simply hit the "1" key on the
keyboard and a button click for a specific button on the form is
simulated?

That's not a short question, really. And questions don't get any
shorter, or any simpler, just by calling them "short".
>As an exercise we had a form that had two input fields and one could
press a button and the contents of the two fields would be added
together.

Did you do it? URL? The odds are that it is far more important to
analyze the basic solution than to invent new complexities. So how did
the page look like when scripting was disabled? Let me guess... a form,
with a button, and clicking on the button does nothing? No explanation
anywhere?
>I thought it would be interesting to write an entire calcualtor
(similar to the one that comes with Windows) as an HTML page.

It would be an exercise in futility, since the calculator would be
inferior even to the _simple_ (as opposite to "scientific ") mode of the
Windows Calculator.
For heaven's sake, give it a rest. It's an *exercise*. I'm sure when you
were learning all this, you went directly from zero to major
world-shaking innovations, but most of us go through a lot of
wheel-reinvention and wheel-imitation first.
Jun 27 '08 #1
3 2594
Scripsit Harlan Messinger:
For heaven's sake, give it a rest.
"It"? You fullquoted like a moron, or a clueless newbie.
It's an *exercise*.
So what? It doesn't make it any more sensible, or any more on-topic.
Learning stupid things when you should study the basics isn't a
justification for anything.
I'm sure when
you were learning all this, you went directly from zero to major
world-shaking innovations, but most of us go through a lot of
wheel-reinvention and wheel-imitation first.
I didn't waste my time babbling like that, to be honest. Sorry for
cheating that way.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #2
Jukka K. Korpela wrote:
Scripsit Harlan Messinger:
>For heaven's sake, give it a rest.

"It"? You fullquoted like a moron, or a clueless newbie.
>It's an *exercise*.

So what? It doesn't make it any more sensible, or any more on-topic.
Learning stupid things when you should study the basics isn't a
justification for anything.
I didn't say anything about its topicality. As for the issue that I'm
challenging you on, since when is programming a small-scale
keyboard-driven interactive application for learning purposes stupid?
Jun 27 '08 #3
Scripsit Harlan Messinger:
I didn't say anything about its topicality.
I did. Which part of "comp.infosyste ms.www.authorin g.html" do you fail
to understand? Followups set.
As for the issue that I'm
challenging you on, since when is programming a small-scale
keyboard-driven interactive application for learning purposes stupid?
Ever since it started meaning you try to do "advanced" things without
having and without wanting to have a clue of the basics. ObHTML: That
applies to doing silly things in HTML "for learning purposes" as well.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2758
by: Steve Jorgensen | last post by:
Well, it seems that Microsoft, or whatever powers that be have decided it's time for us to have yet another standard keyboard layout change. I think I see that the point of this one was to reduce the space occupied by the keys on the right, so the reach to the mouse is not so bad, but the way they chose to do it? Ah - I see. Since most of what we type will simply be deleted at some point, let's make sure the Delete key is big and easy...
1
2921
by: ~dr-sci-fi | last post by:
hi all, problem: i have several controls on my form which can get focus, like buttons/combos. i have to catch keyboard events for special keys like Alt-F1 on my form, for that, i simply implemented keydown event handler on my form control, but when some other control has focus, all keypress events are generated on that control. Q: how can i implement an application wide keypress event handler, so that if Alt-F1 is press on any control...
0
2660
by: Hiroyuki Tanaka | last post by:
Hi All, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to my Completion ComboBox using sendkey.wait. From the keyboard (that will not exist for my final application) I can enter text into my Completion and the selection completes as expected.
5
21067
by: nx-2000 | last post by:
I've got a very large C# forms app and now that its being used in bigger environments we're getting a steady stream of "why does it do this?" problems. The most nagging of which right now is that when a MessageBox.Show() is displayed, if the user hits enter or esc, those keys get passed back to the form. From searching online, this is apparently by design(for whom, I don't know, why its not optional, I _really_ don't know). This...
2
29117
by: Jim S | last post by:
I am having a problem finding information regarding vb.net allowing you to create shortcut keys for buttons using the CTRL key + function buttons such as F1, F2 etc.. (Ex: Press CTRL+F1 to activate a click event on a button). If anyone could help it would be sincerely appreciated. Thank You!
9
6254
by: OpticTygre | last post by:
How would I be able to capture multiple key presses, such as Alt+Shift+D in a form's KeyPress and KeyDown events? Thanks in advance. -Jason
0
2744
by: neonspark | last post by:
I'm buidling some simple macro functionality for my app so the users can record a sequence of keyboard inputs and replay them reliably via some menu. Originally, I used: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) To map "Keys" objects to their string constant, and stored them on a string Queue as they were happening. Then (after resetting the form), I simulate replaying of these actions by flushing the queued...
14
2960
by: raylopez99 | last post by:
KeyDown won't work KeyPress fails KeyDown not seen inspired by a poster here:http://tinyurl.com/62d97l I found some interesting stuff, which I reproduce below for newbies like me. The main reason you would want to do this is for example to trigger something from an OnPaint event without resorting to boolean switches-- say if a user presses the "M" key while the program is Painting, the user gets the PaintHandler to do something else. ...
6
6783
by: mhangman | last post by:
how can we send keys to keyboard? i want to write a script that will push keyboard buttons and do what i want. its for a macro prog. there are some kinds at c++ and at java. for example actools prog. but i want to this in python... note:im not talking about print a key im talking about use it from its device please help
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.