How to check ascii code of each key stroke?
Is here any method to trap ascii code of each key pressed by the user on the keyboard? Also I want to conditionally assign new code replacing the old one.
Thanx for ur kind favor...
you cannot check a keystroke after typing it.
try a trick: create two items (Item 1 : maximum length 1, automatic skip = TRUE) (Item 2 : normal item, normal length, e.g. a char-item).
Let's say the focus is in item 1. Now you have a WHEN-VALIDATE-ITEM-Trigger on this item. After each keystroke your item navigates to the next item (item 2). This Trigger adds the input of item 1 to item 2.
:Block.Item2 := :Block.Item2 || :Block.Item1;
In the WHEN-NEW-ITEM-INSTANCE of Item2 you go back with "go_item ('BLOCK.ITEM1')".
In the KEY-NEXT-ITEM-Trigger of Item1 you go to another vaild item but not to item2 (because of the trigger WHEN-NEW-ITEM-INSTANCE of item2). e.g. "go_item ('BLOCK.ITEM3')"
With this trick you can use each keystroke in item1 and display the apropriated value in item2.
try it
Gerd
Similar Messages
-
How to check postal code contains only 0 to 9
Hi all,
How to check postal code contains only 0 to 9
thank youHi
Check the below link.It may help you out.
http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
Cheers,
Hakim
mark all useful answers -
How to check the code of spawned report
Hi All,
I've to modify a standard report from PA module.The report name is "PRC: Distribute Usage and Miscellaneous Costs"
The executable method is SPAWNED.The executable name is PASDUC.
Please let me know how to check the code of this report and in which path can I locate the report.
Regards,
Mahi.Does this mean can I tell to my client that "This is being a spawned program, any customizations to this report needs full report development efforts"?I believe yes.
Before I state this to my client I want to verify with this forum. Please suggest me in either case.Would your client trust my reply on here :) ?
I would suggest you log a SR and confirm this with Oracle support, that would be a better proof.
Thanks,
Hussein -
Hi all
I have A view invoice_track
i want to check the code of this view please guide me how i will check
Thanks And Regards
Vikas singhalvikas singhal wrote:
Hai asif same result
SQL> set linesize 1200
SQL> SELECT owner, text
2 FROM all_views WHERE owner = 'NEERAJ'
3 AND view_name = 'INVOICE_TRACK';
OWNER TEXT
ZENSOL1 SELECT id as invoice_no, customer_name,
nvl(dispatch_date,invoice_note_date) as
SQL> Regards
VikasUse
SET long 100000 -
Dear Team,
I want to check Object Code of T_Code:OMJJ.
In T_code:SE93.it not showing .
How I check Perticulater Object Code for Transastion OMJJ
thanks
kallisIn SU24 it show
@5B\QMaintained@ S_CTS_ADMI Administration Functions in Change and Transport System Check NO
@5B\QMaintained@ S_DATASET Authorization for file access Check NO
@5B\QMaintained@ S_DEVELOP ABAP Workbench Check NO
@5B\QMaintained@ S_DOKU_AUT SE61 Documentation Maintenance Authorization Check NO
@5B\QMaintained@ S_GUI Authorization for GUI activities Check NO
@5B\QMaintained@ S_PRO_AUTH IMG: New authorizations for projects Check NO
@5B\QMaintained@ S_PROJECT Project Management: Project authorization Check NO
@5B\QMaintained@ S_TABU_DIS Table Maintenance (via standard tools such as SM30) Check NO
@5B\QMaintained@ S_TABU_RFC Client Comparison and Copy: Data Export with RFC Check NO
@5B\QMaintained@ S_TCODE Transaction Code Check at Transaction Start Check NO
@5B\QMaintained@ S_TRANSLAT Translation environment authorization object Check NO
@5B\QMaintained@ S_TRANSPRT Transport Organizer Check NO
It show So many Object and it standed object .and at last it show NO in Proposal Colom
Thanks
kallis -
How to check the code source of some function in the portal.
hi all.
i have some problem in the portal.
i use the ESS in the portal, and now some people can not check their salary.
i want to check the code source, but i do not know it uses which program.
can some one tell me the way to check the program.
best regards.If you want to access the source code of any ESS component, you will need access to NWDI. NWDI NWDI = NetWeaver Development Infrastructure, it provide the tools and process to build new / modify existing applications built using NWDS. There are plenty of threads discussing how to set up NWDI, you may search for the same.
However if the payslip problem is only for some users, it could also be a pdf issue, have you tried running the payslip for those select users within ECC?
Thanks,
GLM -
How to specify ASCII code in the delimeter of concat function
Hi, all.
In a graphical mapping in XI, how do we specify ASCII code
(hexadecimal) in the delimiter of concat standard function?
i'd like to use spaces with ASCII code(0x20) as a delimiter
because if we just enter spaces it would be very difficult
to identify what and how many delimiters are.
Thanks.Hi,
>> if we just enter spaces it would be very difficult
>>to identify what and how many delimiters are.
why dont you write a small userdefined function where you add number of spaces based on a loop.
int totalspaces = 10;
for(int i = 0; i<totalspaces;i++)
a += "";
return a;
cheers,
naveen -
How to Check Exit Code on WINNT
Hi there,
Do you know how to check the exit code of the sql*loader on WinNT? In my Java program, I start the sql*loader like this,
Runtime.exec( "sqlldr ..." );
Thanks,
Louie
nullHi,
If u see the java documentation Runtime.getExec returns a Process Object which has a method getExitValue. If u need More Info Pls Refer to http://developer.java.sun.com
Regards,
Ganesh R -
how to check my redeem code
If you are referring to the balance...
See: Check the balance of a gift card here > Account Home - Apple Store -
How to convert ascii codes into Strings
Is it possible to convert integers (ascii codes) into Strings. It cannot be done by casting like:
int temp = (String)(111)
Please help me out. I think there is a method for this.Something as simple as String.valueOf((char) 111) comes to mind...
-
hello everyone, i have coded a program that user type text in (textArea1) and then press a button and copy this text to (textArea2) , before it copy this text i got a tokenizer that make every word copied in a single line, the question is , how i can make the program only accept arabic charachters? i mean , if user type english or type numbers or anything except arabic text, it gives a message that he should only use arabic char.. hope to hear from u soon
you should check the integer code of every char in the string to make sure it falls within the unicode range of arabic letters
-
How to check from code in Excel Addin that Excel is embedded in Microsoft word
We've developed an Excel Addin in C# for Excel 2010 and it works perfectly OK. But one issue is reported very recently as below.
1. Microsoft word document is created with an embedded excel work sheet.
2. Save the document and close.
3. Open the word document and try to edit the work sheet there.
4. Following error comes.
"The program used to create this object is Excel. That program is either not installed on your computer or it is not responding.
To edit this object, install Excel or ensure that any dialog boxes in Excel are closed."
5. This is because, our Addin is initialized and one excel process is running.
6. If the Excel Addin is disabled, above work flow works correctly.
Please let me know how to determine from the Excel Addin that the excel worksheet is embedded in another applicatoin. Because I want to disable the Addin in those cases and enable it if the Excel is opened standalone. The Addin is developed in C#.Hi,
Since the error message, please try to install this Hotfix test if it works:
http://support.microsoft.com/kb/2596494
Note: Delete the Excel instance running in the background(Go to your task manager and delete it) before opening your Word document and edit your embedded Excel.
If the issue still exists, please see the article and try the solution which I copied here:
"The basic simple answer is to place a Marshal.ComReleaseObject(Wb) at the end (or better, in the Finally block) of your event handlers. This will properly allow Word and excel to handle the OLE communication by not having VSTO hang on to an instance
handle of the workbook, therefore causing the error.
And this is not carte blanche to start placing ComReleaseObject() all over your code. I have found VERY VERY few limited cases where using ComReleaseObject() in an add-in necessary. And this is one of them."
http://davecra.com/2012/10/09/vsto-and-comole/
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Regards,
George Zhao
TechNet Community Support -
How to write the code for a panel when using treeview?
Hi,
We are developing a new plug-in in Indesign as based on treeview. we have completed the design part, but we have some doubts in coding..
One dialog widget and three panels(General, fitting, Eventsandscripts).
The .fr file:
resource GeneralPanelWidget (kGeneralPanelResourceID)
__FILE__, __LINE__,
kGeneralPanelWidgetID, // WidgetId
kPMRsrcID_None, // RsrcId
kBindNone, // Frame binding
Frame(0,0,800,500) // Frame
kTrue, // Visible
kTrue, // Enabled
kGeneralPanelTitleKey, // Panel name
StaticTextWidget
kInvalidWidgetID, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 15, 138, 35, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefProjectPathStringKey, // Initial text.
ksamPrefProjectPathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefProjectPathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame binding
Frame(140, 15, 420, 35), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseProjectButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 15, 500, 35,
kTrue, kTrue,
ksamChooseBtnStringKey,
StaticTextWidget
0, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 45, 138, 65, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefImagePathStringKey, // Initial text.
ksamPrefImagePathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefImagePathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame binding
Frame(140, 45, 420, 65), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseImgpathButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 45, 500, 65,
kTrue, kTrue,
ksamChooseBtnStringKey,
StaticTextWidget
0, // WidgetId (default=0)
kSysStaticTextPMRsrcId, // RsrcId
kBindNone, // Frame binding
10, 75, 138, 95, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kAlignLeft, kEllipsizeEnd,kTrue, // Alignment, ellipsize style
ksamPrefMasterTempPathStringKey, // Initial text.
ksamPrefMasterTemplatePathTextEditBoxWidgetID // No associated widget
// TextEditBox Widget resource
TextEditBoxWidget
ksamPrefMasterTemplatePathTextEditBoxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindNone, // Frame 85
Frame(140, 75, 420, 95), // Frame (l,t,r,b)
kTrue, kTrue // Visible, Enabled
0, // Widget id of nudge button (0 so we dont get one)
0, 0,// small,large nudge amount
0, // max num chars(0 = no limit)
kFalse,// is read only
kFalse,// should notify each key stroke
kFalse,// range checking enabled
kFalse,// blank entry allowed
0, // Upper bounds
0, // Lower bounds
"", // Initial text
ButtonWidget
ksamChooseMasterTempButtonWidgetID,
kSysButtonPMRsrcId,
kBindNone,
430, 75, 500, 95,
kTrue, kTrue,
ksamChooseBtnStringKey,
CheckBoxWidget
ksamShowFrameLabelCheckBoxWidgetID, // WidgetId
kSysCheckBoxPMRsrcId, // RsrcId
kBindNone,
Frame( 10, 165, 320, 185) // left, top, right, bottom
kTrue, // Visible
kTrue, // Enabled
kAlignLeft, // Alignment
ksamShowFrameLabelChkBoxTextKey // Initial text
DefaultButtonWidget
kOKButtonWidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
320, 380, 390, 400, // Frame (l,t,r,b)
kTrue, kTrue, // Visible, Enabled
ksamPrefSaveStringKey, // Button text
CancelButtonWidget
kCancelButton_WidgetID, // WidgetID
kSysButtonPMRsrcId, // RsrcID
kBindNone, // Binding
400, 380, 470, 400, // Frame (l,t,r,b)
kTrue, kTrue, // Visible, Enabled
ksamPrefCancelStringKey, // Button name
kTrue, // Change to Reset on option-click.
This is for General panel design and we have written the code for this..but we dont know where to call this functions. we implemented this plug-in based on BasicSelectableDialog sample plug-in. please guide me to complete this code.
Thanks in Advance..Your question is not very clear. Have you gone through the PanelTreeView.sdk example in the sdk?
-
Need help with converting characters to ASCII code
Hey. Im trying to write a program to make Caesar Ciphers by random numbers. This cipher must also wrap from front to end of ASCII code, so that if, for example, the character being ciphered is Z and its being modified by +3, the result ciphered character is not "]", but "c".
Im planning on reading the text that the user inputs (using ConsoleIO) into a string and then seperating each character into a character[]. Then, i would like to find the ASCII code of each character and print out the ASCII code character of the old ASCII code + the modifier.
So far, this is what i have (sorry for the length, i like to space things out so that its easier on the eyes and more organized... X-( ... ):
public class EvanFinalB {
static ConsoleIO kbd = new ConsoleIO();
static String enteredPhrase;
static int phraseLength;
public static void main(String[] args)
System.out.println("Enter a phrase and this program will cipher it into a secret message.");
System.out.println("/nEnter your phrase here:");
//read phrase
enteredPhrase = kbd.toString();
//find length of entered text
phraseLength = enteredPhrase.length();
//declare arrays for the individual characters of the entered text and the ciphered characters
char[] enteredChar = new char[phraseLength + 1];
char[] cipheredChar = new char[phraseLength + 1];
//loop converting of entered text into seperate characters
for(int x = 1; x <= phraseLength; x++)
enteredChar[x] = enteredPhrase.charAt(x);
cipheredChar[x] = cipher(enteredChar[x]);//call cipher() method to find new ciphered character
//wrap from front to end of ASCII code
static char cipher(char enteredChar)
//choose random number to cipher message by
int modifier = (int)(Math.random() * 26) + 1;
if(enteredChar + modifier > 90)//90 is the ASCII code for "Z" which is the last capital letter
cipheredChar = (97 + (modifier - (90 - enteredChar)));//97 is the ASCII code for "a" which is the first lower case letter
return cipheredChar[1];
}The program is obviously in its early stages but (i started creating it today actually), if there is a simple method or anything that i can use to find the ASCII value of a character in order to use enteredChar so that 'enteredChar' is equal to the ASCII code of the new ciphered character, please help me out...Thanks
P.S. If there's an easier way to go about creating a program for Caesar Ciphers, let me know.The following code is from my Java textbook Big Java by Cay Horstmann. It is not my code and it's just to guide you in your own cipher.
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
This class encrypts files using the Caesar cipher.
For decryption, use an encryptor whose key is the
negative of the encryption key.
public class CaesarCipher
Constructs a cipher object with a given key.
@param aKey the encryption key
public CaesarCipher(int aKey)
key = aKey;
Encrypts the contents of a stream.
@param in the input stream
@param out the output stream
public void encryptStream(InputStream in, OutputStream out)
throws IOException
boolean done = false;
while (!done)
int next = in.read();
if (next == -1) done = true;
else
byte b = (byte) next;
byte c = encrypt(b);
out.write(c);
Encrypts a byte.
@param b the byte to encrypt
@return the encrypted byte
public byte encrypt(byte b)
return (byte) (b + key);
private int key;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Scanner;
This program encrypts a file, using the Caesar cipher.
public class CaesarEncryptor
public static void main(String[] args)
Scanner in = new Scanner(System.in);
try
System.out.print("Input file: ");
String inFile = in.next();
System.out.print("Output file: ");
String outFile = in.next();
System.out.print("Encryption key: ");
int key = in.nextInt();
InputStream inStream = new FileInputStream(inFile);
OutputStream outStream = new FileOutputStream(outFile);
CaesarCipher cipher = new CaesarCipher(key);
cipher.encryptStream(inStream, outStream);
inStream.close();
outStream.close();
catch (IOException exception)
System.out.println("Error processing file: " + exception);
} -
I bought a programmable keyboard recently for which I can program the hardware scan code of each key. I would like to have a key that is recognized in X using the default xkb rules as the hyper key, but I can't figure out for the life of me how xkb translates hardware scan codes into "keycodes" which are then mapped to symbols in the /usr/share/X11/xkb/keycodes files. Basically, if someone can tell me how X goes from hardware scan codes to keycodes, or just what the scan code is for hyper in the default X keyboard config, I would appreciate it immensely.
Thanks for the replies, everyone. So after seeing this thing about setkeycodes, I thought that maybe there was also a getkeycodes, and surely enough there was. Running it gets you a table like this:
Plain scancodes xx (hex) versus keycodes (dec)
for 1-83 (0x01-0x53) scancode equals keycode
0x50: 80 81 82 83 99 0 86 87
0x58: 88 117 0 0 95 183 184 185
0x60: 0 0 0 0 0 0 0 0
0x68: 0 0 0 0 0 0 0 0
0x70: 93 0 0 89 0 0 85 91
0x78: 90 92 0 94 0 124 121 0
Escaped scancodes e0 xx (hex)
e0 00: 0 0 0 0 0 0 0 0
e0 08: 0 0 0 0 0 0 0 0
e0 10: 165 0 0 0 0 0 0 0
e0 18: 0 163 0 0 96 97 0 0
e0 20: 113 140 164 0 166 0 0 0
e0 28: 0 0 255 0 0 0 114 0
e0 30: 115 0 172 0 0 98 255 99
e0 38: 100 0 0 0 0 0 0 0
e0 40: 0 0 0 0 0 119 119 102
e0 48: 103 104 0 105 112 106 118 107
e0 50: 108 109 110 111 0 0 0 0
e0 58: 0 0 0 125 126 127 116 142
e0 60: 0 0 0 143 0 217 156 173
e0 68: 128 159 158 157 155 226 0 112
e0 70: 0 0 0 0 0 0 0 0
e0 78: 0 0 0 0 0 0 0 0
which shows that a scan code of e068 maps to 128, the keycode for Hyper, by default. Great, problem solved.
Unfortunately, when I fired up the keyboard programming software, it wouldn't let me assign a scan code of e068 to any keys, for some unexplained reason. Okay, so I use an unmapped scan code, 0x68, that it does allow me to use. I figured I'd use setkeycodes to set 0x68 to map to 128. But now when I run showkey -s, the key that I thought I programmed to 0x68 gives 0xe078, with a keycode of 192, even though getkeycodes suggests that 0xe078 is unmapped. I even tried booting the kernel with the atkbd.softraw=0 parameter, to no avail. Furthermore, when I run xev in an X session, the keycode for the key in question now shows up as 249.
By this point, I had no idea what was going on anymore, so I just gave up and used xmodmap to set keycode 249 to Hyper_R. I now have a Hyper key, but I can only get it via a series of obscure commands, rather than something that works out of the box. Oh well.
If anyone can explain what was going on here, I'd still like to know, just out of curiosity.
Thanks again.
Maybe you are looking for
-
Changing Computers - How do I move Lightroom and its images?
I'm retiring an old MAC notebook and moving to a new desktop MAC so I have to move LR and all my images, preferences, etc. I currently have an internal hard drive with the following: root\applications\adobe lightroom.app root\pictures\lighroom\lightr
-
Hi, I'm attempting to transfer my iTunes library from a tiBook running Tiger to an Intel Imac running Leapard. I'm using this procedure: On the tibook, I went to iTunes/File/Library/Export Library and saved the .xml file to the Desktop. I then restar
-
Nokia N8 does not turn sideways
i have a nokia n8 and when i turn the phone sideways the screen does not rotate Solved! Go to Solution.
-
OWB - Discoverer bridge is not working
Hello, I'm working with OWB version 9.2.0 and I created a complete datawarehouse. I want to create a Discoverer EUL with the bridge functionality. When I finished the wizard OWB returns with: transfer operation failed, see log for details. When I ope
-
Not holding music folder settings
I keep my music on a removable volume, and it seems as soon as iTunes is open and the volume is unmounted, the music path defaults to within my home directory. This is really a pain, and it's not a surprise (any alias I make to a folder on my removab