I have a class and I would like to capture a keystroke. I know there are events in a WinForm application for keypresses. I want my class to be able to capture a keystroke, without using WinForms. I know I can create a keyboard hook, but I would prefer not to use that method, as it involves importing other Windows libraries and I would like this to work under Mono, as well as Windows. All I need is the ASCII code of the key pressed. I don't need to capture modifiers, such as ctrl, alt, shift, etc...  Any suggestions?
I'm using code that I found on the .  The only problem is it uses external DLL calls that don't work in mono.  I was wondering if anyone knew of a way to accomplish the same thing as that code, but will run in both Windows using .net, and Linux using mono?  Edit:  Clarifying what I'm trying to do: I'm making a .  The program sits in the system tray and when the user presses the hot-key, it will pop up all the gadgets.  So the program doesn't have focus, so typically it won't catch any keystrokes, so I'm using the low-level keyboard hook and I hook the two keys that the user defines as the hot-keys.  But I'm using a Windows DLL call for that, which doesn't work in Linux using mono.  So I'm wondering if there's a way to do the same thing, but will run in Linux using mono?
A function that is continuous at the origin but not differentiable there Show that $f(x,y)=\dfrac{xy^2}{x^2+y^2}$ (with $(x,y)\not=(0,0)$ and $f(0,0)=0$) is continuous but not differentiable at $(0,0)$.  I tried to show continuity with an $\epsilon -\delta$ argument but I don't know how to factorize the expression so that I can have something useful.   For differentiability I think I should show that the partials are not continuous at $(0,0)$. But finding the partials is also painful. How can I install a Canon printer or scanner driver? I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner? Can you use a readied action to teleport out of the way of a weapon attack? Let's say that a player uses the ready action and says "If a character aims at me with a weapon, I'll use Teleport to move behind cover."  What happens? Does this work? If not, please cite the rules to explain why not. How do you join or create a server in multiplayer? I just got Minecraft Pocket Edition on my iPhone, but I'm having trouble figuring out how to start multiplayer. When I go to menu, there is only one button that says Play. How do I join or create servers? How many RSA keys before a collision? Canonical Question  I want to do &lt;some really cool thing&gt; with a lightning:datatable, but I can't seem to figure out how to do it. I checked the , but I did not see a way to implement &lt;this really cool feature I need&gt;.  Perhaps I want to provide tooltips, or a pick list, or alter the behavior of the menus, or display images, or show a custom component I created, or define a new row-level click behavior, or alter the keyboard event handlers, etc.  Can I somehow do this? Java Round up Any Number My new 1,5 TB ext4 Hard Disk makes mysterious noises and fails to read and write. But not always. Sometimes it just works. But then I get those following errors. Does anyone know a solution for that or is my new WD Caviar Black 1.5 TB hard disk broken?  [  551.162286] ata7: SATA link down (SStatus 0 SControl 310) [  551.162294] ata7.00: link offline, clearing class 1 to NONE [  551.178223] ata7: EH complete [  551.190802] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen [  551.190807] ata7: irq_stat 0x00000040, connection status changed [  551.190811] ata7: SError: { CommWake DevExch } [  551.190818] ata7: limiting SATA link speed to 1.5 Gbps [  551.190822] ata7: hard resetting link   Update Mainboard P7P55D LE: Function that returns the second argument of Reap How do I diff two text files in Windows Powershell? I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't considered?  I've tried compare-object, but get this cryptic output:  PS C:\&gt; compare-object one.txt two.txt  InputObject                                                 SideIndicator -----------                                                 ------------- two.txt                                                     =&gt; one.txt                                                     &lt;= How do I mount a qcow2 disk image? How to select an index value from a String Array in a JOptionPane Is there any way to add an ePub book to iBooks without iTunes? I purchased a book and have it in ePub and PDF formats. I can easily add the PDF to iBooks from Safari. However, I can't find a method to get an ePub book into iBooks without iTunes. I'm away from my laptop with iTunes where my iPhone syncs, so that's not an option at the moment.  Is there anyway to add an ePub book to iBooks without iTunes? The strange thing is that opened scripts or newly opened ones are working fine. It's the new created C# scripts that are not working.  With not working, I mean the MonoBehaviour is not in light blue color it's in black color. In this screenshot I took, I marked it with a red circle.    What have I tried so far? I have closed Visual Studio and started over again.  Since it didn't solve it, I closed the unity editor and started it over again, to no avail.  I pressed 'clean solution', I pressed 'rebuild solution', I pressed 'build solution'.  What else can I do ? And why are the other scripts working fine? If I type gameo...it will auto complete it to GameObject but in this specific script it's just not working.  This is a screenshot of the editor. I have in the Hierarchy a Ladder object.  In the Assets I created a folder name Ladder and a script name Ladder. But this Ladder script is not working.    This is the Ladder script and this script was working before but once I created another script inside the ladder folder name Raise empty script the Raise script didn't work and now the Ladder is not working either. But other scripts are working fine.  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Ladder : MonoBehaviour {     public Transform charcontroller;      private bool inside = false;     private float heightFactor = 3.2f;      private void OnTriggerEnter(Collider other)     {             inside = true;     }      private void OnTriggerExit(Collider other)     {             inside = false;     }      private void Update()     {         if (inside == true &amp;&amp; Input.GetKey("w"))             charcontroller.transform.position += Vector3.up / heightFactor;     } } Can I find out which tags I have created? This would be interesting to know.  The tags could be highlighted on the users page for example. How can I simulate a slow machine in a VM? If I've decided to update my SE avatar (in any of the various ways well described in the answer to this ), am I able to return to either the original stock image or previous avatar images I have used? I want to display from cache for a long time and I want a slightly different behavior on page render vs loading the page from cache.  Is there an easy way I can determine this with JavaScript? Disable white background of pasted text in PowerPoint When I paste text from another source with "Keep source formatting option" into PowerPoint 2010 I receive a white background, that I don't want.    How can I make this text background transparent, so there would be just red text on purple? If $x$ and $y$ are irrational, is $x + y$ irrational? Is $x - y$ irrational?