BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

Hello,

 

does anyone know if it is possible to create a keyboard shortcut like CRTL+SHF+L for propcase?

I am looking to create a keyboard shortcut: CRTL+SHFT+P to convert text into propcase instead of typing it in.

Just like how CTRL+SHIFT+L convert all the text into lower case.

 

thanks

KC

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I don't see anything in the Enhanced Editor commands that looks likely for Propcase.

 

And I can see why not as there are some folks that use varaiables like AgeAtArrest, or PaymentDate. Propcase would not know in the case of compound words like that to leave alone or create as shown.

 

One of the things that I actually use Excel for is to turn file layout documentation into SAS Input, Format and Label statements as often the documentation comes as a table that can be copied and Pasted into Excel. I add a column with the desired variable name (if needed) and then can use an Excel formula to create cells with string values like:

 

varname = "Text from the description column"

That I can copy into the editor as a Label entry.

 

The description column could be modified using the Excel propcase.

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

It would help to know what editor you are using.

 

You can certainly create abbreviations for propcase, or perhaps modify the keys menu.

--
Paige Miller
Kc2
Quartz | Level 8 Kc2
Quartz | Level 8
Hi Paige,
I am using the enhanced editor. I am not looking to create an abbreviation for propcase. I want to create a keybord shortcut which transforms the select text to propcase. If I copy my la my labels from a word.doc file into SAS instead of manually updating them I would like to be able to select the text and press CTL+SHT+alphaKey to have the text converted to propcase just like CTL+SHT+L does when it allows the user to convert the selected text in lower case.
SASKiwi
PROC Star

The PROPCASE SAS language function is only available when you run SAS code, and it applies only to SAS data. So I don't think you can create a shortcut that would apply this to the text of your SAS program - that functionality would have to be added to the enhanced editor. Given the editor has been a legacy, maintenance-only product for many years I can't see this happening.  

PaigeMiller
Diamond | Level 26

In the enhanced editor, you can create an abbreviation, so for example whenever you type PR or any other string you want (lower or upper case, it doesn't matter) and press ENTER, the string propcase appears in your code.

--
Paige Miller
ballardw
Super User

I don't see anything in the Enhanced Editor commands that looks likely for Propcase.

 

And I can see why not as there are some folks that use varaiables like AgeAtArrest, or PaymentDate. Propcase would not know in the case of compound words like that to leave alone or create as shown.

 

One of the things that I actually use Excel for is to turn file layout documentation into SAS Input, Format and Label statements as often the documentation comes as a table that can be copied and Pasted into Excel. I add a column with the desired variable name (if needed) and then can use an Excel formula to create cells with string values like:

 

varname = "Text from the description column"

That I can copy into the editor as a Label entry.

 

The description column could be modified using the Excel propcase.

Kc2
Quartz | Level 8 Kc2
Quartz | Level 8

Thank you everyone.

Too bad this functionality doesn't exist. I will move the text file to excel, update them in excel and then do a SAS import. 

FreelanceReinh
Jade | Level 19

Hello @Kc2,

 

You can create a keyboard macro in the Enhanced Editor that comes very close to this functionality (difference: not selected text, but the next word is converted to mixed case): 

  1. From the main menu select Tools --> Keyboard Macros --> Macros...
  2. Press the "Create..." button.
  3. Enter a suitable keyboard macro name and description and put together the commands shown in the screenshot below from the list of "Commands" (after selecting the respective "Categories" or category "All"). When finished, confirm with OK.
  4. Press the "Assign keys..." button.
  5. Click into the field "Press new shortcut key" and press the desired shortcut key (e.g. Alt+P). Make sure that it is "Currently assigned to: None." Confirm with OK.

propcase.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

@Kc2 wrote:
If I copy ... my labels from a word.doc file into SAS ...

Then another option would be to perform the conversion in Word: select the text to be converted and press Shift+(up to three times F3).

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2100 views
  • 0 likes
  • 5 in conversation